I am a little confused with AWS Service control policies.
https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html
So assuming I have a policy like this at SCR level.
{
“effect”: “Allow”,
“Action”:[
“s3:*”
],
“Resource”: “*”
}
Will this restrict by default access to all other resources not listed here? For example, EC2, DynamoDB, lambda etc? and only allow users in this AWS organization to perform action on S3?
I think, I am not able to understand what is the purpose of having an “Allow” at the Service control policy level.
Related discussions:
So iirc, there is a default policy that allows everything for all the accounts in an organisation. Now if you remove that policy, and then apply this ↑, then yes you will have access to only S3 and rest all will be denied.
Remember that SCP is kinda like a boundary it is also used to deny something (say the default policy allows everything). So that means you can use your other personally created SCP like a deny list instead of an allow list.
So yeah simple concept - SCP default is allow all. And you can use that as a deny list if you create your own SCP.
This will allow any principle you assign the policy full access to any S3. You need this because the default behavior is to deny
Also, SCPs are mostly used for denying services you know you will never use in your org, or those stupidly expensive instances you know you will never use. I know I don’t want Joe User able to spin up a cluster of those 50k a day monsters on a friday before vacation week.
This will allow any principle you assign the policy full access to any S3.
No it wont.
This is an SCP, SCP’s don’t provide access to anything.
An allow in an SCP, means any identities in the account which the SCP is applied to can be assigned that permission via a identity policy.
SCP’s are an account level boundary.
An SCP establishes a boundary on an account.
The default SCP allows all.. which means no restrictions are applied
meaning any identity policy applied to any identity in that account will grant the permissions (or deny them) as normal.
If you have a more restrictive SCP.. one which say allows EC2, S3, RDS … and that is applied to an AWS account … even if identities inside that account were granted access to say EFS via identity policy, that access would not be effective.
SCPs create a boundary… only things allowed in an SCP AND allowed via an identity policy have any effect.
if you are allowed in an identity policy but not allowed in the SCP … its not allowed.
but SCP’s don’t grant permissions, so an allow in an SCP does nothing if there is no identity policy also allowing.
if something isn’t allowed, or is denied in an SCP … an allow in an identity policy means nothing, it will be denied.
all good, it’s happened to us all.
Imagine if that Joe user spinning up a dedicated host 