# How should individual developers access DEV/PROD accounts in an AWS Organization?

**URL:** <https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112>\
**Category:** Security & IAM\
**Tags:** iam\
**Created:** [January 11, 2023, 3:19pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112 "2023-01-11T15:19:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrMungg](https://awshq.com/letter_avatar_proxy/v4/letter/m/f4b2a3/32.png) [@MrMungg](https://awshq.com/u/MrMungg)\
**Post date:** [January 11, 2023, 3:19pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/1 "2023-01-11T15:19:07Z")

</div>

Hi,

For some small hobby projects, I use AWS Organization to manage the different stages of applications. An application will have a DEVELOPMENT account and a PRODUCTION account for the respective stages. Each application is in its own OU (containing both stages).

Now, I usually login via the Administrator role (IAM of root user) and then assume either DEVELOPMENT or PRODUCTION. I’m pretty sure this isn’t best practice.

In addition, I now want to give a friend of mine access to the DEVELOPMENT/PRODUCTION account of a certain project. This is where this approach is clearly not working anymore. Therefore I wanted to ask, what is the recommended way of setting up and giving access to developer accounts?

I looked at the various guides from AWS, such as [What is AWS Organizations? - AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) and [Establishing your best practice AWS environment - Amazon Web Services](https://aws.amazon.com/organizations/getting-started/best-practices/?nc1=h_ls), but I couldn’t find this info!

* * *

**Related discussions:**

- [How do you actually catch security issues in Terraform PRs when you’re doing solo reviews?](https://awshq.com/t/how-do-you-actually-catch-security-issues-in-terraform-prs-when-youre-doing-solo-reviews/21300)
- [Is it just me, or is the “Serverless First” mantra starting to feel like a trap?](https://awshq.com/t/is-it-just-me-or-is-the-serverless-first-mantra-starting-to-feel-like-a-trap/20947)
- [How are you segregating AWS IAM Identity Center (SSO) permission sets at scale?](https://awshq.com/t/how-are-you-segregating-aws-iam-identity-center-sso-permission-sets-at-scale/20989)
- [How to find where IAM user is being used when all they can do is ses:SendRawEmail ?](https://awshq.com/t/how-to-find-where-iam-user-is-being-used-when-all-they-can-do-is-ses-sendrawemail/21205)
- [AWS things you wish somebody had told you earlier](https://awshq.com/t/aws-things-you-wish-somebody-had-told-you-earlier/21301)

---

<div class="post-metadata">

**Author:** ![StockerRumbles](https://awshq.com/letter_avatar_proxy/v4/letter/s/8e7dd6/32.png) [@StockerRumbles](https://awshq.com/u/StockerRumbles)\
**Post date:** [January 11, 2023, 3:35pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/2 "2023-01-11T15:35:00Z")

</div>

I am sure that there are other ways to do this, I believe that using AWS SSO is one way, but I haven’t used it, I started reading the documentation and it seemed like a solution for a big org as it didn’t seem like a simple way to set up access.

In the org I work for, we use a 3rd party authentication provider to allow users to log in to an account.

To do this a user will log in to this provider (that would be okta or [opal.dev](https://opal.dev) in our case), if they want console access they can select the role/account they want and they are then provided with access through their web session (but it will only work for an hour). CLI access is also handled fairly nicely, opal provide a cli tool for this and okta have one, but it is being phased out now (which is why we now use opal),. These basically just update your `.aws/config` or credentials file so that when you try to use awscli/terraform/whatever it finds the creds in your env

When the user logs in, they are given access to a role in the management account, this role has the ability to assume the other roles in the other accounts, and no other permissions. This means they don’t have access to the root management account, instead they can basically do nothing in the management account, until they assume another role. To make switching roles easier in the browser we use the [role switcher](https://addons.mozilla.org/en-US/firefox/addon/aws-extend-switch-roles3/) plugin

Actually in the case of opal, it’s actually a user in the management account, but assuming roles is the same, I believe using a role instead is on the way

---

<div class="post-metadata">

**Author:** ![gomibushi](https://awshq.com/letter_avatar_proxy/v4/letter/g/7feea3/32.png) [@gomibushi](https://awshq.com/u/gomibushi)\
**Post date:** [January 11, 2023, 4:19pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/3 "2023-01-11T16:19:20Z")

</div>

We use SSO and Azure AD.  
Then we provision permission sets which become roles on accounts and assign users or groups to the account-permission set combo.

We have a very restricted permission set for prod. Set up so the devs can only view the “surface” of things and only read logs and a dlq-messages and such. No data-access. Only read access on the little they can see.

Changes need to happen through the pipeline.

Data need to be kept from being readable.

Dev accounts are a free-for-all. 😉

---

<div class="post-metadata">

**Author:** ![MrMungg](https://awshq.com/letter_avatar_proxy/v4/letter/m/f4b2a3/32.png) [@MrMungg](https://awshq.com/u/MrMungg)\
**Post date:** [January 11, 2023, 5:00pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/4 "2023-01-11T17:00:09Z")

</div>

Thanks for all the answers. After doing some more googling, and your input, I have found that I could setup AWS Control Tower, which will automatically setup some blueprints I could use, as well as AWS IAM Identity Center (successor to AWS SSO). I would move existing users and OUs into the new Control Tower setup. Then I can setup access for the devs in AWS IAM Identity Center.

Is this a good path to take?

---

<div class="post-metadata">

**Author:** ![CS-0010](https://awshq.com/letter_avatar_proxy/v4/letter/c/f14d63/32.png) [@CS-0010](https://awshq.com/u/CS-0010)\
**Post date:** [January 11, 2023, 5:11pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/5 "2023-01-11T17:11:22Z")

</div>

For me, I like to keep things simple as long as possible before I move to all the other tools like Control Tower, etc.

For the past of least resistance and to follow what I believe to be best practices, I would do the following for your friend _and for you_:

1. Create IAM users for the both of you, with Console access.
2. Create a Role for Admin (you) and another for Friend (your friend). Assign policies to it according.
3. Then, both of you login and change your role as needed.

Not much more is required to achieve what you’re looking for, imo.

---

<div class="post-metadata">

**Author:** ![2fast2nick](https://awshq.com/letter_avatar_proxy/v4/letter/2/9e8a1a/32.png) [@2fast2nick](https://awshq.com/u/2fast2nick)\
**Post date:** [January 11, 2023, 5:12pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/6 "2023-01-11T17:12:22Z")

</div>

> [@StockerRumbles](#):
>
> I am sure that there are other ways to do this, I believe that using AWS SSO is one way, but I haven’t used it, I started reading the documentation and it seemed like a solution for a big org as it didn’t seem like a …

AWS Identity Center.. Formally known as AWS SSO. Yes this is the way. SSO is integrated with the CLI now.

---

<div class="post-metadata">

**Author:** ![dasoijdsoifjoisjdoij](https://awshq.com/letter_avatar_proxy/v4/letter/d/e99b99/32.png) [@dasoijdsoifjoisjdoij](https://awshq.com/u/dasoijdsoifjoisjdoij)\
**Post date:** [January 11, 2023, 5:28pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/7 "2023-01-11T17:28:52Z")

</div>

> [@MrMungg](#):
>
> Thanks for all the answers. After doing some more googling, and your input, I have found that I could setup AWS Control Tower, which will automatically setup some blueprints I could use, as well as AWS IAM Identity …

yes

---

<div class="post-metadata">

**Author:** ![Gronk0](https://awshq.com/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@Gronk0](https://awshq.com/u/Gronk0)\
**Post date:** [January 11, 2023, 6:06pm UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/8 "2023-01-11T18:06:39Z")

</div>

> [@MrMungg](#):
>
> Thanks for all the answers. After doing some more googling, and your input, I have found that I could setup AWS Control Tower, which will automatically setup some blueprints I could use, as well as AWS IAM Identity …

Yes to SSO (aka IAM Identity Center) but no to Control Tower.

Control tower is probably overkill for a hobby organization.

And never, ever use the root user - delete any keys associated with it, and make sure you have MFA enabled.

---

<div class="post-metadata">

**Author:** ![professor\_jeffjeff](https://awshq.com/letter_avatar_proxy/v4/letter/p/a9a28c/32.png) [@professor\_jeffjeff](https://awshq.com/u/professor_jeffjeff)\
**Post date:** [January 12, 2023, 12:44am UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/9 "2023-01-12T00:44:51Z")

</div>

> [@gomibushi](#):
>
> We use SSO and Azure AD. Then we provision permission sets which become roles on accounts and assign users or groups to the account-permission set combo. We have a very restricted permission set for prod. Set up so the …

This is the way.

---

<div class="post-metadata">

**Author:** ![kteague](https://awshq.com/letter_avatar_proxy/v4/letter/k/f4b2a3/32.png) [@kteague](https://awshq.com/u/kteague)\
**Post date:** [January 12, 2023, 2:23am UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/10 "2023-01-12T02:23:49Z")

</div>

> [@MrMungg](#):
>
> Thanks for all the answers. After doing some more googling, and your input, I have found that I could setup AWS Control Tower, which will automatically setup some blueprints I could use, as well as AWS IAM Identity …

It’s reasonable, and certainly the way to go when you have tens or hundreds of devs to support.

The biggest drawback is that you have to sign-in to a login session for each AWS account. So it’s a bit of a hassle to MFA in for each account (and I typically run something like Firefox multi-account container for each account).

Having a plain IAM User in a central account and creating Roles that you can switch to in the sub-accounts means you can MFA once and use AWS Extend Switch Roles to bounce between accounts. It’s much faster for bouncing between accounts. If you want to scale that style to tens of users, a tool like Paco lets you declare what kind of Roles you can assume and who is allowed to assume each one, then it takes care of setting up those Roles for you. IAM Role trust policies have something like a 2048 char limit, so it doesn’t scale beyond around 30 users or so though …

---

<div class="post-metadata">

**Author:** ![CSYVR](https://awshq.com/letter_avatar_proxy/v4/letter/c/f475e1/32.png) [@CSYVR](https://awshq.com/u/CSYVR)\
**Post date:** [January 12, 2023, 8:00am UTC](https://awshq.com/t/how-should-individual-developers-access-dev-prod-accounts-in-an-aws-organization/16112/11 "2023-01-12T08:00:00Z")

</div>

> [@2fast2nick](#):
>
> AWS Identity Center.. Formally known as AWS SSO. Yes this is the way. SSO is integrated with the CLI now.

> it didn’t seem like a simple way to set up access

- Enable SSO
- Add user
- Grant user permission to account

It’s sooo much simpler than IAM users that need to assume roles cross account
