# AWS Service control policy - Allow.. What is that for?

**URL:** <https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846>\
**Category:** Databases\
**Tags:** dynamodb, ec2, lambda\
**Created:** [September 6, 2022, 3:52pm UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846 "2022-09-06T15:52:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snoo\_326521](https://awshq.com/letter_avatar_proxy/v4/letter/s/f04885/32.png) [@Snoo\_326521](https://awshq.com/u/Snoo_326521)\
**Post date:** [September 6, 2022, 3:52pm UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/1 "2022-09-06T15:52:58Z")

</div>

I am a little confused with AWS Service control policies.

[https://docs.aws.amazon.com/organizations/latest/userguide/orgs\_manage\_policies\_scps.html](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:**

- [Appropriate DynamoDB Use Case?](https://awshq.com/t/appropriate-dynamodb-use-case/21122)
- [Amazon DynamoDB now supports real-time vector search at any scale](https://awshq.com/t/amazon-dynamodb-now-supports-real-time-vector-search-at-any-scale/21505)
- [How are you planning to use DSQL without foreign keys?](https://awshq.com/t/how-are-you-planning-to-use-dsql-without-foreign-keys/19382)
- [AWS Lambda Function URL returns Forbidden despite AuthType NONE and public Resource Policy (Rust)](https://awshq.com/t/aws-lambda-function-url-returns-forbidden-despite-authtype-none-and-public-resource-policy-rust/21480)
- [Replicating DynamoDB streams feature in RDS](https://awshq.com/t/replicating-dynamodb-streams-feature-in-rds/21533)

---

<div class="post-metadata">

**Author:** ![Kratos3301](https://awshq.com/letter_avatar_proxy/v4/letter/k/bc8723/32.png) [@Kratos3301](https://awshq.com/u/Kratos3301)\
**Post date:** [September 6, 2022, 4:31pm UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/2 "2022-09-06T16:31:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JSTARR3561](https://awshq.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@JSTARR3561](https://awshq.com/u/JSTARR3561)\
**Post date:** [September 6, 2022, 5:41pm UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/3 "2022-09-06T17:41:26Z")

</div>

This will allow any principle you assign the policy full access to any S3. You need this because the default behavior is to deny

---

<div class="post-metadata">

**Author:** ![gomibushi1](https://awshq.com/letter_avatar_proxy/v4/letter/g/54ee81/32.png) [@gomibushi1](https://awshq.com/u/gomibushi1)\
**Post date:** [September 6, 2022, 6:19pm UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/4 "2022-09-06T18:19:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![acantril1](https://awshq.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@acantril1](https://awshq.com/u/acantril1)\
**Post date:** [September 6, 2022, 10:58pm UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/5 "2022-09-06T22:58:04Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![acantril1](https://awshq.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@acantril1](https://awshq.com/u/acantril1)\
**Post date:** [September 6, 2022, 11:01pm UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/6 "2022-09-06T23:01:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JSTARR3561](https://awshq.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@JSTARR3561](https://awshq.com/u/JSTARR3561)\
**Post date:** [September 7, 2022, 12:13am UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/7 "2022-09-07T00:13:51Z")

</div>

My bad. Read too quickly

---

<div class="post-metadata">

**Author:** ![acantril1](https://awshq.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@acantril1](https://awshq.com/u/acantril1)\
**Post date:** [September 7, 2022, 12:25am UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/8 "2022-09-07T00:25:59Z")

</div>

all good, it’s happened to us all.

---

<div class="post-metadata">

**Author:** ![NonameideaonlyF1](https://awshq.com/letter_avatar_proxy/v4/letter/n/f6c823/32.png) [@NonameideaonlyF1](https://awshq.com/u/NonameideaonlyF1)\
**Post date:** [December 21, 2022, 3:50am UTC](https://awshq.com/t/aws-service-control-policy-allow-what-is-that-for/31846/9 "2022-12-21T03:50:02Z")

</div>

Imagine if that Joe user spinning up a _dedicated host_ 💀
