How much AWS access do you give a coding agent?

November 17, 2026 5 answers
Asked by 2h!cinderwhisk_736

Is a read-only role enough, or do you let an agent make changes in some accounts? What do you actually use it for, and how do you keep production and customer data safe?

Answers

_g62~rivetcaper.5

Start with a role limited to the resources the task needs. For debugging, that might be configuration and CloudWatch logs for one project, not a broad account-wide role. Check what those logs contain before granting access, since read-only can still expose customer data or secrets.

That level can help investigate errors, review configuration, or follow up on cost reports, such as finding unused volumes. Verify the findings before acting on them.

_m38+velvetnotch.7:

Separate profiles can help when a task needs extra access temporarily, rather than leaving that access in the default role.

Reply to this answer
_c72!tinselmarker.8

For changes, let the agent edit Terraform or another infrastructure-as-code project, then review the code and the plan before CI applies it. That gives it plenty to do without handing it direct write access to the account.

Production deployments can stay behind human approval. An agent can suggest IAM cleanup or infrastructure changes, but the proposed change still needs a careful review.

Reply to this answer
Kelmori+5v

I would be more flexible in a separate sandbox account. Give the agent the deployment permissions it needs to prototype and iterate, with account-level guardrails in place. Review the infrastructure changes and run security checks before taking anything further.

That is a different risk from granting the same access in production. Keep production access narrower and require a human to approve deployments there.

Reply to this answer
_s37!tandemfob.4

None is a reasonable option too. Give it the repository and paste in relevant command output or configuration after checking it for sensitive data. You can run the commands yourself and decide what to share.

It's slower than letting the agent investigate directly, but useful when the task doesn't justify AWS credentials.

Reply to this answer
8p+ledgerwhistle_526

Another option is to grant deployment through a specific workflow, rather than general write access. For example, an agent could work with CDK and read the resulting logs in a development environment, while a person handles the production deploy.

The permissions still need to match what that deployment can actually change. Restricting the entry point doesn't make the resulting infrastructure changes harmless.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions