What it’s for
Reviewing your AWS setup alongside your code. A chat agent checks whether the S3 bucket a service writes to blocks public access, or which security groups allow inbound traffic from anywhere. A workflow step you write compares the IAM policies in your account with what the repository’s infrastructure code says they should be. Agents reach your account through the AWS MCP Server, AWS’s managed server for AI agents, using an IAM role you create. The role’s permissions are exactly what agents can do in your account, and you can change them at any time.How AWS differs from the other integrations
AWS doesn’t use a bot account or an authorization screen. You create an IAM role in your account from a CloudFormation template Amplify publishes, and Amplify assumes that role whenever an agent calls an AWS tool.- Amplify stores no AWS secret. No access keys, no passwords. Console keeps the role’s ARN, the account id, the region, the connection’s external ID, and who connected it and when. Each time Amplify assumes the role, the credentials last at most one hour, and agents never receive them.
- Only Amplify can assume the role, and only for your organization. The role trusts one Amplify role, Amplify’s connector role, and only with an external ID that Console generates for your connection. It has nothing to do with the AWS Amplify service.
- One AWS account per organization. To switch accounts, disconnect and connect again.
- Tool names follow AWS’s pattern,
aws___<action>(three underscores), not<App>_<Action>.
What Amplify can and can’t do in your account
The role is read-only by default. However, agents can do whatever the policies you attach allow through the AWS MCP Server. If you attach a policy that allows creating, changing or deleting resources, agents can do that too. The template gives the role:-
The managed policies you choose. The template’s
ManagedPolicyArnsparameter lists them. By default it’s two AWS managed read-only policies:SecurityAudit, which reads resource configuration and metadata across services.CloudWatchLogsReadOnlyAccess, which reads CloudWatch Logs events, so agents can investigate what your services logged. It doesn’t includelogs:Unmask, so data masked by CloudWatch Logs data protection stays masked.
-
A Deny statement for requests made through the AWS MCP Server. It refuses a fixed list of actions that
return credentials, secrets or data, whatever policies you attach:
- credentials and passwords: STS session and federation tokens, ECR, ECR Public and CodeArtifact authorization tokens, Redshift and Redshift Serverless credentials, RDS IAM database authentication, EC2 Windows passwords, and Lightsail instance access details and database master passwords
- secrets: Secrets Manager secret values, Systems Manager parameters, and Glue connections
- data: KMS decryption, ECR image manifests and layers, S3 objects and object versions, and DynamoDB items
(
GetItemandBatchGetItem)
dynamodb:Queryordynamodb:Scan, and it grants nothing. - A Deny statement for presigned S3 downloads. The role refuses S3 object reads authenticated by a query string, wherever the request comes from, so a presigned download URL signed with this role doesn’t work.
What agents can do
The first five only read AWS documentation and public information about AWS.
aws___run_script and
aws___get_tasks act in your account: chat, in Console or Slack, has them, and any other agent has them only
if it lists them in allowed-tools (see Using AWS tools in an agent).
aws___run_script is how agents inspect your account. Scripts run on AWS’s side, not in Amplify. A longer
script continues as a task the agent polls with aws___get_tasks, and a result longer than 20,000 characters
is truncated. Every result is checked for instructions aimed at the agent before the agent sees it, as other
integration results are.
The AWS MCP Server also has a tool that creates presigned S3 URLs. Amplify doesn’t offer it to agents.
What agents can’t do
- Do anything the role’s policies don’t allow. With the default policies, that means agents can’t create, change, or delete resources. A refused call reaches the agent as AWS’s permissions error.
- Read what the template’s Deny statements refuse through the AWS MCP Server, such as Secrets Manager values, Systems Manager parameters, or S3 object contents, even if a policy you attach allows it (see the Warnings above for what they don’t cover)
- Reach another AWS account, or use AWS from the CLI, which has no organization connections
Connecting
You need to be an organization admin in Console. In AWS, you need to be signed in to the account you’re connecting, with permission to create CloudFormation stacks and IAM roles.- Open Connections, select Add connection, and choose AWS under Agent Tools.
- Pick a Region from the supported regions and select Create. The region is where your account reaches the AWS MCP Server, and where the CloudFormation link opens.
- Select Create stack in AWS. It opens the AWS console’s quick-create page with
AmplifyConnectorRoleArnandExternalIdalready filled in; don’t change them.ManagedPolicyArnsshows its default,SecurityAuditandCloudWatchLogsReadOnlyAccess; change it now if you want different access (see Keeping agents away from secrets), or later. - At the bottom of the page, select the checkbox acknowledging that CloudFormation might create IAM resources with custom names, then create the stack.
- When the stack reaches
CREATE_COMPLETE, open its Outputs tab and copyRoleArn. - Back in Console, select I’ve created the stack, paste the ARN into Role ARN, and select Verify.
AssumeRole event in CloudTrail (see
Auditing in CloudTrail). When it passes, chat has the AWS tools from its next turn,
and workflow runs from their next run.
Creating the role yourself (CloudFormation or Terraform)
If your team deploys IAM through its own pipeline, use the template or the Terraform module rather than Create stack in AWS. Console’s stack step shows the connection’s external ID, with Copy external ID, and a Download the template link. Both are published in theamplify-security/aws-connection-template
repository, with a release for each version. The template the quick-create link deploys is also hosted for
each release, for example
AmplifyConsoleAccess-v1.0.0.yaml.
A stack’s TemplateVersion output says which release created it.
- With CloudFormation, deploy the template as a stack, acknowledging
CAPABILITY_NAMED_IAM, and pass the external ID asExternalId. Optionally passManagedPolicyArnstoo. - With Terraform or OpenTofu, use the module, which creates the same role. Its
role_arnoutput is the ARN to paste in Console.
- With another tool, copy the role from the template in the repository: its trust policy, its policies,
and a name that starts with
AmplifyConsoleAccess-with no path, which Amplify needs to assume it. Watch the repository for new releases (on GitHub, Watch → Custom → Releases), and update your copy to match each one.
Restricting or expanding access
Access is whatever the role’s policies allow, so you change it in AWS, not in Console. There’s nothing to reconnect. The clean way is to update the stack’sManagedPolicyArns parameter (managed_policy_arns in the
Terraform module), a comma-separated list of managed policy ARNs that replaces the defaults, SecurityAudit
and CloudWatchLogsReadOnlyAccess. Avoid attaching policies to the role directly in IAM.
- To expand it, add a policy to
ManagedPolicyArns, for example read access to a service thatSecurityAuditdoesn’t cover. The template’s Deny statements still apply, so an action they refuse stays refused, whatever you attach. - To restrict it, replace the defaults in
ManagedPolicyArnswith narrower policies, or add a policy with Deny statements next to them.
aws:ViaAWSMCPService is true on any request made through an AWS
managed MCP server. aws:CalledViaAWSMCP names the MCP server the request came through. For example, this
statement keeps agents out of one bucket’s configuration:
Keeping agents away from secrets
If your account keeps secrets in environment variables, user data or templates, keep the role from reading them. Either:- Replace the defaults with your own read policy that leaves those reads out, and pass its ARN in
ManagedPolicyArns; or - Keep the defaults and add a Deny policy. Create a customer managed policy like the one below, and set
ManagedPolicyArnsto all three, for examplearn:aws:iam::aws:policy/SecurityAudit,arn:aws:iam::aws:policy/CloudWatchLogsReadOnlyAccess,arn:aws:iam::<your account>:policy/AmplifyNoSecretReads.
lambda:ListFunctions stops them listing your functions at all. Adjust the list to what your account uses.
The Deny policy doesn’t cover CloudWatch Logs. If your logs may hold sensitive information, leave
CloudWatchLogsReadOnlyAccess out of ManagedPolicyArns; agents then can’t read them.
Auditing in CloudTrail
Everything agents do in your account is recorded in CloudTrail in your account:- An
AssumeRoleevent each time Amplify assumes the role, with a role session name ofamplify-<orgId>, where<orgId>is your Amplify organization’s id (org_…). The caller is Amplify’s AWS account,791657206107. - The API calls the agents’ scripts make, attributed to
assumed-role/AmplifyConsoleAccess-<suffix>/amplify-<orgId>.
Each successful check of the connection also records a denied
AssumeRole event from Amplify’s account.
That’s Amplify confirming the role refuses an external ID other than your connection’s, and it’s expected. A
check runs each time the connection is verified or re-checked in Console, and about every 15 minutes while
it’s in the error state described under Troubleshooting.Disconnecting
Disconnect from the AWS card on Connections (organization admins only). Chat and new workflow runs lose the AWS tools. Runs already in progress lose their access for the rest of the run, including their access to your other integrations, not only AWS.Troubleshooting
Creating the stack fails. Read the stack’s Events tab. AManagedPolicyArns entry that isn’t a
managed policy ARN, or names a policy that doesn’t exist, fails the role. Fix the parameter, delete the failed
stack, and create it again from the same link.
Verifying says Amplify couldn’t assume the role. Check, in order:
- The stack has finished (
CREATE_COMPLETE). - You pasted the stack’s
RoleArnoutput, from the stack this connection’s link created. - The stack was created from this connection’s link, so its external ID matches.
- A role you built yourself has the template’s trust policy, and a name that starts with
AmplifyConsoleAccess-with no path.
aws___run_script. Apart from chat itself, an agent gets it only if its
allowed-tools lists it by name (see Using AWS tools in an agent).
An agent says it was throttled. Amplify and AWS both limit how often an organization can call the AWS MCP
Server, and the agent is told to wait and retry once. Fewer, larger scripts help.
Supported regions
The AWS MCP Server is available in these regions, and a connection uses one of them:
IAM is global, so the region only chooses the AWS MCP Server endpoint. Scripts can still read resources in
other regions. To move a connection to a different region, disconnect and connect again.
Using AWS tools in an agent
Once AWS is connected, the tools reach agents in two ways:- The five documentation tools are offered like other integration tools: to every agent without an
allowed-toolsrestriction, and to an agent that setsallowed-toolsonly if it lists them by exact name. aws___run_scriptandaws___get_tasksact in your account, so they’re offered only to an agent whoseallowed-toolslists them by exact name, in a workflow run or started from chat. An agent withoutallowed-toolsdoesn’t get them, and no built-in agent lists them. Chat itself, in Console or Slack, has them whenever AWS is connected.
