Troubleshooting and Best Practices
8.1. Common Issues and Solutions
Issue: Permission Denied Errors
# Check your current AWS identity
aws sts get-caller-identity
# Verify permissions
aws iam get-user
aws iam list-attached-user-policies --user-name YOUR_USERNAME
Issue: Scan Takes Too Long
- Use service-specific scanning:
--services s3,ec2 - Limit regions:
--regions us-east-1 - Use tag filtering to reduce scope
Issue: Memory or Resource Errors
- Reduce worker count:
--workerCounts 2 - Scan fewer services at once
- Use CloudShell in a region with fewer resources
8.2. Best Practices
Scanning Strategy:
- Start with critical services (IAM, S3, EC2)
- Gradually expand to all services
- Run regular scans (weekly/monthly)
- Focus on high-impact findings first
Report Management:
- Store reports securely (never expose publicly)
- Track remediation progress over time
- Share findings with relevant teams
- Document remediation actions taken
Performance Optimization:
- Use tag filtering for large environments
- Scan during off-peak hours
- Consider breaking large scans into smaller chunks
- Monitor CloudShell resource usage