This tool executes scripts that may affect your AWS environment. Always run it from a sandbox environment with read-only permissions. A Terraform script is provided in the sandbox folder to create an EC2 instance with the appropriate read-only IAM role for safe auditing.
AWS Audit Assistant is your AI-powered partner for ensuring AWS resource compliance with best practices. It provides intelligent insights and recommendations for security and efficiency improvements.
- Multi-Agent System: Coordinated agents working together for comprehensive auditing
- Documentation Retriever: Fetches and analyzes AWS best practices documentation
- Boto3 Code Assistant: Generates and executes AWS API calls safely
- Resource Auditor: Evaluates resources against compliance standards
| Component | Description |
|---|---|
| Model Provider | Amazon Bedrock (Claude 3.5 Sonnet) |
| Native Tools | boto3, file_read, shell, python_repl |
| Custom Agents | Documentation Retriever, Boto3 Code Assistant, Resource Auditor |
-
AWS Account with appropriate permissions
Required Permissions:
- Create EC2 instances
- Create IAM roles
- Create Security Groups
Additional Resources:
-
Python 3.11 or higher
-
- Installation guides for different platforms:
-
AWS credentials configured locally or appropriate IAM role
-
Terraform (for sandbox environment)
# Install dependencies using uv
uv pip install -r requirements.txt
# Run the assistant
uv run ai_assistant.pyThe sandbox environment provides a secure way to run the AWS Audit Assistant with appropriate read-only permissions. It includes Terraform configurations to create an EC2 instance with the necessary IAM roles and security settings.
# Navigate to sandbox directory
cd sandbox
# Initialize Terraform
terraform init
# Review the deployment plan
terraform plan
# Deploy the resources
terraform applyLearn more:
After the infrastructure is deployed, copy the necessary files to the EC2 instance:
scp -i ./audit-assistant-key.pem \
../ai_assistant.py \
../aws_document_agent.py \
../strands_boto_agent.py \
../requirements.txt \
ec2-user@<instance-public-ip>:/home/ec2-user/Learn more:
SSH into the EC2 instance and install the required packages:
# Connect to the instance
ssh -i ./audit-assistant-key.pem ec2-user@<instance-public-ip>
# Install dependencies
pip3 install -r requirements.txtLearn more:
python3 ai_assistant.py- EC2 instance is configured with read-only IAM role
- Security group limits inbound access
- All operations are performed with least-privilege permissions
- Terraform-managed infrastructure for consistency
Learn more:
When you're done using the sandbox environment, destroy the resources to avoid unnecessary charges:
terraform destroyLearn more:
The AWS Audit Assistant accepts natural language queries about your AWS resources. Here are some example commands:
> Check if my S3 bucket 'my-bucket' follows security best practices
> Audit EC2 instance 'i-1234567890abcdef0' in us-west-2 for security compliance
> Verify if my IAM policies follow the principle of least privilege
> Evaluate RDS database 'my-database' configuration against AWS recommendations
- Comprehensive Auditing: Evaluates resources against AWS best practices
- Natural Language Interface: Simple English commands to perform complex audits
- Safe Execution: Read-only operations by default
- Detailed Reports: Clear findings and recommendations
- Multi-Resource Support: Covers S3, EC2, IAM, RDS, and more
- Best Practice Updates: Stays current with AWS recommendations
- Always use the sandbox environment for production audits
- Review generated scripts before execution
- Use read-only IAM roles when possible
- Monitor AWS CloudTrail for audit activities
- Regularly update dependencies for security patches
If you can't connect to the EC2 instance:
- Verify your security group allows SSH access from your IP
- Ensure you're using the correct key pair
- Check that the instance is running
Resources:
If dependencies fail to install:
- Verify Python version (3.11+ required)
- Check internet connectivity
- Ensure pip is up to date
Resources:
If the assistant fails to run:
- Verify all required files were copied correctly
- Check AWS credentials are properly configured
- Review EC2 instance role permissions
Resources:
- AWS Security Best Practices
- AWS Well-Architected Framework
- IAM Security Best Practices
- AWS CLI User Guide
- Python AWS SDK (boto3) Documentation
- Terraform AWS Provider Documentation
For issues or questions:
- Review the troubleshooting section above
- Check AWS Documentation
- Visit the AWS Support Center
- Submit issues through the project's issue tracker
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
