- Newest
- Most votes
- Most comments
All the SCPs attached to each individual level of the organisation hierarchy (including the last level that is the individual account) are evaluated together. For example, if you have both the FullAWSAccess and your S3-only SCP attached to the OU level where you're hoping only S3 permissions to apply, the "Allow" statements in both those two SCPs will be combined, causing everything to be allowed.
If you specifically want an implicit deny to block actions other than s3:*, you should ensure there's one level of hierarchy where only the S3-only allow policy is attached. The appropriate level in your case would probably be the individual account that only contains S3 resources.
One alternative would be to write an explicit Deny statement with a NotAction element containing s3:*.
What you're missing is that the policy FullAWSAccess is applied to the account by default, and so what you're describing is correct behaviour.
This is fully explained about halfway down https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_evaluation.html
AWS Organizations attaches an AWS managed SCP named FullAWSAccess to every root, OU and account when it's created. This policy allows all services and actions. You can replace FullAWSAccess with a policy allowing only a set of services so that new AWS services are not allowed unless they are explicitly allowed by updating SCPs.
Further down the page it walks you through a scenario that is very similar to what you're looking to achieve (allowing only access to specific service(s) and denying everything else), by replacing FullAWSAccess with a bespoke policy.
Thank you both! I was missing the fact the default SCP was still applied to the account. I thought it would be replaced with a new attachment.
answered 2 years ago
Relevant content
asked 2 years ago
asked 3 years ago
- AWS OFFICIALUpdated 5 months ago
