Restricting ReadOnlyAccess for Sensitive AWS Resources
Last updated: November 24, 2026
Astra asks for the AWS managed ReadOnlyAccess policy on the IAM user or role it uses, so it can review your AWS configuration without changing anything. If some resources are too sensitive to share even read-only, you can keep them out of reach with an extra deny policy, and still meet Astra's access requirements.
How deny policies work
AWS always applies an explicit Deny over any Allow, even when the allow comes from another policy. So you can:
Keep the
ReadOnlyAccessmanaged policy on the user or role.Add a custom policy that denies access to the specific services, resources or data you want to protect.
Astra can then review everything else, and AWS blocks the protected resources.
Create the deny policy
Open the IAM console, click Policies, and then click Create policy.
Choose the JSON editor and paste your deny policy. The sample below blocks reading one S3 bucket and its objects. Replace
my-sensitive-bucketwith your bucket name, or add more resources.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenySensitiveBucket",
"Effect": "Deny",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-sensitive-bucket",
"arn:aws:s3:::my-sensitive-bucket/*"
]
}
]
}Click Next, give the policy a name, for example
DenyAstraSensitiveResources, and click Create policy.Open the IAM user or role that has
ReadOnlyAccess, go to the Permissions tab, and attach the new policy.
We recommend testing the policy before the review starts, for example with the IAM policy simulator, to check that the protected resources are blocked and the rest is still readable.
Things to keep in mind
Findings on resources you deny can't be reported, because Astra can't see them.
If you deny whole services, tell your Astra contact, so they know the review won't cover them.
To limit the review to tagged resources instead, use the target's Scan Scope step. Read Scanning only the cloud resources you choose.
For the IAM user setup, read 📄 How-To: Creating a Security Auditor Role in AWS.
If you need help writing a deny policy for your environment, contact support from your Astra dashboard or reach out to your CSM.