Open-source automated security scanner for Amazon Bedrock, Amazon SageMaker AI, and Amazon Bedrock AgentCore — Built on AWS Well-Architected Framework (Generative AI Lens)
Cloud security automation with 52 security checks for your generative AI and machine learning workloads. Identify IAM misconfigurations, encryption gaps, network isolation issues, and compliance violations with interactive HTML reports and actionable remediation guidance.
The framework generates professional, interactive security assessment reports with filtering, search, and dark mode support.
| Download Sample Reports | Single Account | Multi-Account |
Executive Dashboard (Light Mode) |
Executive Dashboard (Dark Mode) |
Interactive Findings Table with Filtering |
|
This serverless assessment framework automatically evaluates your AI/ML workloads against AWS security best practices. It uses AWS serverless services to gather data from the control plane and generate reports containing the status of various security checks, severity levels, and recommended actions.
Designed for workloads using Amazon Bedrock, Amazon Bedrock AgentCore, or Amazon SageMaker AI.
| Challenge | How This Framework Helps |
|---|---|
| Manual security audits are time-consuming | Fully automated scanning with one-click CloudFormation deployment |
| Inconsistent security checks across teams | Standardized 52-check assessment based on AWS Well-Architected best practices |
| Difficulty tracking AI/ML security posture | Interactive HTML dashboards with severity breakdown and per-account visibility |
| Multi-account complexity | Consolidated reporting across AWS Organizations with cross-account role assumption |
| Compliance and audit support | Exportable reports to supplement your compliance program, with remediation guidance linked to AWS documentation |
| Generative AI security gaps | Purpose-built checks for LLM guardrails, model access controls, and prompt injection prevention |
Services Covered:
Deployment Options:
How It Works:
This tool operates within the AWS Shared Responsibility Model. It assesses your configuration responsibilities (IAM policies, encryption settings, network isolation, logging) for AI/ML services. It does not assess AWS-managed infrastructure, physical security, or the underlying service platform.
Point-in-time assessment. Each run captures your security posture at the moment of execution. Resource configurations can change immediately after an assessment completes. Run assessments regularly and after significant changes to maintain visibility.
No guarantee of security or compliance. This framework identifies common misconfigurations based on AWS best practices and the AWS Well-Architected Framework. It does not cover all possible security risks, does not replace formal compliance audits (SOC 2, HIPAA, and similar), and does not guarantee that your workloads are secure. Use the results as one input into your broader security program.
52 checks across three services. The assessment covers Amazon Bedrock, Amazon SageMaker AI, and Amazon Bedrock AgentCore. Other AI/ML services (Amazon Comprehend, Amazon Rekognition, Amazon Textract, and others) are not currently assessed.

aiml-security-single-account or your custom name)AssessmentBucket value{account_id}/security_assessment_*.html fileImportant: The deployment creates TWO AWS CloudFormation stacks. Only one contains your results!
| Stack Type | How to Identify | What It Contains | What to Do |
|---|---|---|---|
| Infrastructure Stack (This is the one you need) |
The name you chose Examples: - my-aiml-assessment- aiml-security-prod- aiml-security-single-account
|
AWS CodeBuild project Amazon S3 bucket for results AWS IAM roles The "AssessmentBucket" output |
Use this stack to view results! 1. Open this stack in console 2. Go to Outputs tab 3. Copy AssessmentBucket value
|
| Assessment Stack (Auto-generated - ignore this) |
Auto-generated name: Single-account: aiml-sec-{account_id}Multi-account: aiml-security-{account_id} per member account, plus aiml-security-mgmt for the management accountExamples: aiml-sec-123456789012 (single)aiml-security-123456789012 (multi)
|
AWS Lambda functions AWS Step Functions Internal resources No outputs you need |
Don't use this stack! It's for internal operations only. Created automatically by AWS CodeBuild. |
Quick Check: If you see a stack name starting with aiml-sec- or aiml-security- followed by numbers (or aiml-security-mgmt), that’s an auto-generated assessment stack. Look for the stack name you originally chose during deployment.
The deployment follows a two-step approach:
Deploy 1-aiml-security-member-roles.yaml to all target accounts using AWS CloudFormation StackSets with service-managed permissions.
aiml-security-member-roles)ManagementAccountID parameter to your management account IDThis uses AWS Organizations to deploy the member role to all accounts in the selected OUs. New accounts added to those OUs will automatically receive the role.
Deploy 2-aiml-security-codebuild.yaml in your central management account or delegated administrator member account.
MultiAccountScan parameter to true.EmailAddress parameter for completion notifications.MultiAccountScan=false)AIMLSecurityMemberRoleMultiAccountScan=true)AIMLSecurityMemberRole in each target accountAIMLSecurityMemberRole in each target accountMultiAccountCodeBuildRole)AIMLSecurityMemberRole)You can check the AWS CodeBuild console to confirm the assessment completed successfully before accessing the results.
aiml-security-single-account.yaml), select the stack you deployed (for example, aiml-security-single-account) and find the AssessmentBucket output. Results are synced to this bucket under the {account_id}/ prefix.aiml-security-multi-account stack created in Step 2: Deploy Central Infrastructure and find the AssessmentBucket outputNote: The deployment creates multiple Amazon S3 buckets. Only use the bucket from the
AssessmentBucketoutput above. Other buckets (such asaiml-sec-*-aimlassessmentbucket-*from nested stacks oraws-sam-cli-managed-*for deployment artifacts) are for internal use and can be ignored.
security_assessment_XXXXX.html reportconsolidated-reports/ folder in the bucketmulti_account_report_YYYYMMDD_HHMMSS.html123456789012/)bedrock_security_report_{execution_id}.csv - Amazon Bedrock security assessment resultssagemaker_security_report_{execution_id}.csv - Amazon SageMaker AI security assessment resultsagentcore_security_report_{execution_id}.csv - Amazon Bedrock AgentCore security assessment resultspermissions_cache_{execution_id}.json - IAM permissions cachesecurity_assessment_{timestamp}_{execution_id}.html - Consolidated HTML report (same features as multi-account report)| Severity | Description |
|---|---|
| High | Critical security issues requiring immediate attention |
| Medium | Important security improvements recommended |
| Low | Minor optimizations suggested |
| Informational | Advisory information, no action required |
| N/A | Check not applicable (no resources to assess) |
| Status | Description |
|---|---|
| Failed | Security issue identified that requires remediation |
| Passed | Checked resources met the assessed best practice at time of scan |
| N/A | No resources exist to check (for example, no notebooks, no guardrails configured) |
aiml-security-member-roles AWS CloudFormation StackSetTo add or remove service permissions, edit the member role permissions in 1-aiml-security-member-roles.yaml.
Adjust the ConcurrentAccountScans parameter based on your organization size and cost considerations.
To remove all resources deployed for single-account assessment:
aiml-sec-{account_id} stack (for example, aiml-sec-123456789012)aiml-security-single-account stack (or your custom stack name)# Empty the assessment bucket
aws s3 rm s3://<assessment-bucket-name> --recursive
# If versioning is enabled, delete version markers
aws s3api delete-objects --bucket <bucket-name> --delete \
"$(aws s3api list-object-versions --bucket <bucket-name> \
--query '{Objects: Versions[].{Key:Key,VersionId:VersionId}}')"
# Delete the bucket
aws s3 rb s3://<bucket-name>
To remove all resources deployed for multi-account assessment:
aiml-security-{account_id} stack (for example, aiml-security-123456789012)aiml-security-mgmt# Assume role in member account and delete stack
aws cloudformation delete-stack --stack-name aiml-security-<account_id> \
--region <region>
aiml-security-multi-account stackaiml-security-member-roles AWS CloudFormation StackSet# List and identify assessment buckets
aws s3 ls | grep aiml-security
# Empty each bucket
aws s3 rm s3://<bucket-name> --recursive
# Delete version markers if versioning was enabled
aws s3api delete-objects --bucket <bucket-name> --delete \
"$(aws s3api list-object-versions --bucket <bucket-name> \
--query '{Objects: Versions[].{Key:Key,VersionId:VersionId}}')"
# Delete the bucket
aws s3 rb s3://<bucket-name>
For a clean removal, delete resources in this order:
aiml-sec-{account_id} (for example, aiml-sec-123456789012)aiml-security-{account_id} per member account, plus aiml-security-mgmt for management accountmy-aiml-assessment)aiml-security-multi-account or your chosen nameAWS CloudFormation StackSet member roles (multi-account only)
| Document | Description |
|---|---|
| Security Checks Reference | Complete reference for all 52 security checks with severity levels |
| Troubleshooting Guide | Common issues, debugging tips, and FAQ |
| Developer Guide | Architecture details, adding custom checks, and contributing |
GitHub Actions workflows run automatically on pull requests and pushes to main:
| Workflow | Trigger | What It Checks |
|---|---|---|
| Python Code Quality | PR | Runs ruff check and ruff format --check on changed Python files |
| CloudFormation Lint | PR | Validates deployment and SAM templates with cfn-lint |
| SAM Validate & Build | PR | Runs sam validate --lint and sam build on SAM templates |
| ASH Security Scan | PR | Scans changed files for secrets, dependency vulnerabilities, and IaC misconfigurations |
| ASH Full Repository Scan | Push to main, monthly | Full repository security scan with results uploaded as artifacts |
We welcome community contributions! Please see Developer Guide for guidelines.
See CONTRIBUTING for reporting security issues.
This library is licensed under the MIT-0 License. See the LICENSE file.