mirror of
https://github.com/awslabs/amazon-bedrock-agentcore-samples.git
synced 2025-09-08 20:50:46 +00:00
* feat: Add AWS Operations Agent with AgentCore Runtime - Complete rewrite of AWS Operations Agent using Amazon Bedrock AgentCore - Added comprehensive deployment scripts for DIY and SDK runtime modes - Implemented OAuth2/PKCE authentication with Okta integration - Added MCP (Model Context Protocol) tool support for AWS service operations - Sanitized all sensitive information (account IDs, domains, client IDs) with placeholders - Added support for 17 AWS services: EC2, S3, Lambda, CloudFormation, IAM, RDS, CloudWatch, Cost Explorer, ECS, EKS, SNS, SQS, DynamoDB, Route53, API Gateway, SES, Bedrock, SageMaker - Includes chatbot client, gateway management scripts, and comprehensive testing - Ready for public GitHub with security-cleared configuration files Security: All sensitive values replaced with <YOUR_AWS_ACCOUNT_ID>, <YOUR_OKTA_DOMAIN>, <YOUR_OKTA_CLIENT_ID> placeholders * Update AWS Operations Agent architecture diagram * feat: Enhance AWS Operations Agent with improved testing and deployment - Update README with new local container testing approach using run-*-local-container.sh scripts - Replace deprecated SAM-based MCP Lambda deployment with ZIP-based deployment - Add no-cache flag to Docker builds to ensure clean builds - Update deployment scripts to use consolidated configuration files - Add comprehensive cleanup scripts for all deployment components - Improve error handling and credential validation in deployment scripts - Add new MCP tool deployment using ZIP packaging instead of Docker containers - Update configuration management to use dynamic-config.yaml structure - Add local testing capabilities with containerized agents - Remove outdated test scripts and replace with interactive chat client approach * fix: Update IAM policy configurations - Update bac-permissions-policy.json with enhanced permissions - Update bac-trust-policy.json for improved trust relationships * fix: Update Docker configurations for agent runtimes - Update Dockerfile.diy with improved container configuration - Update Dockerfile.sdk with enhanced build settings * fix: Update OAuth iframe flow configuration - Update iframe-oauth-flow.html with improved OAuth handling * feat: Update AWS Operations Agent configuration and cleanup - Update IAM permissions policy with enhanced access controls - Update IAM trust policy with improved security conditions - Enhance OAuth iframe flow with better UX and error handling - Improve chatbot client with enhanced local testing capabilities - Remove cache files and duplicate code for cleaner repository * docs: Add architecture diagrams and update README - Add architecture-2.jpg and flow.jpg diagrams for better visualization - Update README.md with enhanced documentation and diagrams * Save current work before resolving merge conflicts * Keep AWS-operations-agent changes (local version takes precedence) * Fix: Remove merge conflict markers from AWS-operations-agent files - restore clean version * Fix deployment and cleanup script issues Major improvements and fixes: Configuration Management: - Fix role assignment in gateway creation (use bac-execution-role instead of Lambda role) - Add missing role_arn cleanup in MCP tool deletion script - Fix OAuth provider deletion script configuration clearing - Improve memory deletion script to preserve quote consistency - Add Lambda invoke permissions to bac-permissions-policy.json Script Improvements: - Reorganize deletion scripts: 11-delete-oauth-provider.sh, 12-delete-memory.sh, 13-cleanup-everything.sh - Fix interactive prompt handling in cleanup scripts (echo -e format) - Add yq support with sed fallbacks for better YAML manipulation - Remove obsolete 04-deploy-mcp-tool-lambda-zip.sh script Architecture Fixes: - Correct gateway role assignment to use runtime.role_arn (bac-execution-role) - Ensure proper role separation between gateway and Lambda execution - Fix configuration cleanup to clear all dynamic config fields consistently Documentation: - Update README with clear configuration instructions - Maintain security best practices with placeholder values - Add comprehensive deployment and cleanup guidance These changes address systematic issues with cleanup scripts, role assignments, and configuration management while maintaining security best practices. * Update README.md with comprehensive documentation Enhanced documentation includes: - Complete project structure with 75 files - Step-by-step deployment guide with all 13 scripts - Clear configuration instructions with security best practices - Dual agent architecture documentation (DIY + SDK) - Authentication flow and security implementation details - Troubleshooting guide and operational procedures - Local testing and container development guidance - Tool integration and MCP protocol documentation The README now provides complete guidance for deploying and operating the AWS Support Agent with Amazon Bedrock AgentCore system. --------- Co-authored-by: name <alias@amazon.com>
175 lines
6.1 KiB
JSON
175 lines
6.1 KiB
JSON
{
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Sid": "ECRImageAccess",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"ecr:BatchGetImage",
|
|
"ecr:GetDownloadUrlForLayer"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:ecr:*:<your-aws-account-id>:repository/*"
|
|
]
|
|
},
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"logs:DescribeLogStreams",
|
|
"logs:CreateLogGroup"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:logs:*:<your-aws-account-id>:log-group:/aws/bedrock-agentcore/runtimes/*"
|
|
]
|
|
},
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"logs:DescribeLogGroups"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:logs:*:<your-aws-account-id>:log-group:*"
|
|
]
|
|
},
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"logs:CreateLogStream",
|
|
"logs:PutLogEvents"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:logs:*:<your-aws-account-id>:log-group:/aws/bedrock-agentcore/runtimes/*:log-stream:*"
|
|
]
|
|
},
|
|
{
|
|
"Sid": "ECRTokenAccess",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"ecr:GetAuthorizationToken"
|
|
],
|
|
"Resource": "*"
|
|
},
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"xray:PutTraceSegments",
|
|
"xray:PutTelemetryRecords",
|
|
"xray:GetSamplingRules",
|
|
"xray:GetSamplingTargets"
|
|
],
|
|
"Resource": [ "*" ]
|
|
},
|
|
{
|
|
"Effect": "Allow",
|
|
"Resource": "*",
|
|
"Action": "cloudwatch:PutMetricData",
|
|
"Condition": {
|
|
"StringEquals": {
|
|
"cloudwatch:namespace": "bedrock-agentcore"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Sid": "GetAgentAccessToken",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"bedrock-agentcore:GetWorkloadAccessToken",
|
|
"bedrock-agentcore:GetWorkloadAccessTokenForJWT",
|
|
"bedrock-agentcore:GetWorkloadAccessTokenForUserId"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:workload-identity-directory/default",
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:workload-identity-directory/default/workload-identity/*"
|
|
]
|
|
},
|
|
{
|
|
"Sid": "AgentCoreIdentityManagement",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"bedrock-agentcore:CreateOauth2CredentialProvider",
|
|
"bedrock-agentcore:CreateWorkloadIdentity",
|
|
"bedrock-agentcore:GetResourceOauth2Token",
|
|
"bedrock-agentcore:ListOauth2CredentialProviders",
|
|
"bedrock-agentcore:ListWorkloadIdentities",
|
|
"bedrock-agentcore:DeleteOauth2CredentialProvider",
|
|
"bedrock-agentcore:DeleteWorkloadIdentity",
|
|
"bedrock-agentcore:GetOauth2CredentialProvider",
|
|
"bedrock-agentcore:GetWorkloadIdentity",
|
|
"bedrock-agentcore:UpdateOauth2CredentialProvider",
|
|
"bedrock-agentcore:UpdateWorkloadIdentity"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:token-vault/default",
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:token-vault/default/*",
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:workload-identity-directory/default",
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:workload-identity-directory/default/workload-identity/*"
|
|
]
|
|
},
|
|
{
|
|
"Sid": "AgentCoreGatewayManagement",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"bedrock-agentcore:CreateGateway",
|
|
"bedrock-agentcore:DeleteGateway",
|
|
"bedrock-agentcore:GetGateway",
|
|
"bedrock-agentcore:ListGateways",
|
|
"bedrock-agentcore:UpdateGateway",
|
|
"bedrock-agentcore:CreateGatewayTarget",
|
|
"bedrock-agentcore:DeleteGatewayTarget",
|
|
"bedrock-agentcore:GetGatewayTarget",
|
|
"bedrock-agentcore:ListGatewayTargets",
|
|
"bedrock-agentcore:UpdateGatewayTarget"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:gateway/*",
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:gateway/*/target/*"
|
|
]
|
|
},
|
|
{
|
|
"Sid": "AgentCoreMemoryAccess",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"bedrock-agentcore:CreateEvent",
|
|
"bedrock-agentcore:ListEvents",
|
|
"bedrock-agentcore:GetEvent",
|
|
"bedrock-agentcore:DeleteEvent"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:bedrock-agentcore:*:<your-aws-account-id>:memory/*"
|
|
]
|
|
},
|
|
{
|
|
"Sid": "SecretsManagerAccess",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"secretsmanager:GetSecretValue"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:secretsmanager:*:<your-aws-account-id>:secret:*"
|
|
]
|
|
},
|
|
{
|
|
"Sid": "BedrockModelInvocation",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"bedrock:InvokeModel",
|
|
"bedrock:InvokeModelWithResponseStream"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:bedrock:*::foundation-model/*",
|
|
"arn:aws:bedrock:*:<your-aws-account-id>:*"
|
|
]
|
|
},
|
|
{
|
|
"Sid": "LambdaInvokeAccess",
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"lambda:InvokeFunction"
|
|
],
|
|
"Resource": [
|
|
"arn:aws:lambda:*:<your-aws-account-id>:function:bac-mcp-tool*"
|
|
]
|
|
}
|
|
]
|
|
}
|