This guide covers common issues and their solutions when working with the SaaS Visualizer application.
Issue: sam build or sam deploy fails with permission errors
Solution:
- Verify AWS credentials:
aws sts get-caller-identity - Ensure your IAM user/role has CloudFormation, Lambda, and other required permissions
- Check the specific error message for missing permissions
Issue: Stack deployment times out Solution:
- Check CloudFormation console for detailed error messages
- Verify resource limits in your AWS account
- Ensure unique resource names if deploying multiple stacks
Issue: Lambda functions can't connect to Aurora database Solution:
- Check VPC configuration in CloudFormation template
- Verify security group rules allow Lambda to Aurora communication
- Ensure database credentials are properly stored in Secrets Manager
Issue: Frontend shows "Configuration not loaded" error Solution:
- Ensure
config.jsexists in thepublic/directory - Download latest config from S3:
aws s3 cp s3://$BUCKET_NAME/config.js public/config.js - Check browser console for specific configuration errors
Issue: Login fails or redirects incorrectly Solution:
- Verify Cognito User Pool configuration
- Check that user exists and password is correct
- Ensure Cognito domain and callback URLs are configured properly
Issue: Raspberry Pi can't connect to AWS IoT Core Solution:
- Verify IoT endpoint URL is correct
- Check certificate file paths and permissions
- Ensure IoT policy allows required actions
- Test network connectivity from Pi
Issue: LED matrix doesn't display correctly Solution:
- Verify hardware wiring matches rpi-rgb-led-matrix wiring guide
- Check power supply is adequate for your panels
- Ensure you're running the script with
sudo - Verify panel configuration in
main.pymatches your hardware
Issue: Messages not appearing on LED display Solution:
- Check IoT Core message logs in AWS console
- Verify topic names match between backend and Pi configuration
- Test message publishing manually using AWS CLI
- Check Pi logs for connection and message reception
Issue: API calls take too long to respond Solution:
- Check Lambda function logs for performance bottlenecks
- Monitor Aurora database performance metrics
- Consider increasing Lambda memory allocation
- Review database query performance
Issue: Frontend loads slowly Solution:
- Check CloudFront distribution configuration
- Optimize asset sizes and compression
- Review network performance from your location
- Consider enabling CloudFront caching
Issue: npm run dev fails to start
Solution:
- Ensure Node.js version is compatible (v18.x - v22.x)
- Clear node_modules and reinstall:
rm -rf node_modules && npm install - Check for port conflicts (default is 5173)
Issue: Hot reload not working Solution:
- Restart the development server
- Check file system permissions
- Verify Vite configuration in
vite.config.js
Cause: Insufficient IAM permissions Solution: Add required permissions to your IAM user/role
Cause: Incorrect certificate configuration Solution: Regenerate certificates and update file paths
Cause: Frontend domain not allowed by API
Solution: Ensure the IsDevDeployment CloudFormation parameter is set to True. This parameter sets a more permissive CORS policy which is necessary when using the localhost development server.
Cause: Network or security group configuration Solution: Check VPC and security group settings
If you continue to experience issues:
- Check the project's GitHub issues
- Review AWS service documentation for specific services
- Check AWS CloudWatch logs for detailed error messages
- Ensure you're using supported versions of all dependencies
- Enable debug logging by setting
IsDevDeployment=Truein deployment - Use browser developer tools to inspect network requests
- Check CloudWatch logs for Lambda function errors
- Monitor AWS service health dashboards
- Test components individually to isolate issues