AWS multi-account automation utopia

This post was reposted from

AWS multi-account automation utopia (LinkedIn)

Earlier this year, an excellent

whitepaper

was published about organizing your AWS environment using multiple accounts. To ease adoption of a multi-account environment, I've been working on automating the recommendations based on work I described in an earlier post titled Why not Terraform. I wrote another post about an AWS Serverless Application Model (SAM) project to automate new account creation activities with AWS Control Tower. I've been refining the project in hopes of submitting it as an official AWS Quick Starts to codify AWS' official recommendations and best practices. I organized the project into two components:

sam-organization-setup

sam-organization-setup (GitHub)

This projects deploys a single Lambda function and is invoked as a CloudFormation custom resource. The project needs to be deployed into the AWS Organizations management account because it sets up delegated administrators for a variety of services.

The project can be deployed either before or after Control Tower has been set up, as long as an organization in AWS Organizations is available.

The Lambda function does the following one-time setup activities:

enables all policy types
enables AWS service access
enables AWS Organizations access
enables organizational sharing
creates an organizational IAM access analyzer in the Control Tower "Audit" account
delegates administration to the Control Tower "Audit" account
in each region, delegates administration to the Control Tower "Audit" account and enables organizational access
in each region, delegates administration to the Control Tower "Audit" account and enables organizational access
in each region, delegates administration to the Control Tower "Audit" account and enables organizational access
in each region, delegates administration to the Control Tower "Audit" account

I want to continue enhancing the Lambda function to support:

sam-account-setup

sam-account-setup (GitHub)

This project watches for the AWS Control Tower CreateManagedAccount event on Amazon EventBridge and orchestrates a variety of activities on the newly created account using a AWS Step Functions state machine.

There are individual Lambda functions that perform these activities:

Conclusion

I see a lot of customers using Terraform to manage their multi-account environments, and there's nothing wrong with that approach, but I would strongly encourage customers to evaluate AWS Control Tower and the guardrail capabilities that it provides out of the box. It will save a lot of time from having to replicate the guardrails using Terraform and they wouldn't be able to take advantage of any future enhancements being released in AWS Control Tower.

AWS Control Tower's integrations into other services such as Amazon EventBridge, give you almost unlimited customization and automation opportunities to secure your environment.

Related

Customizations for AWS Control Tower (AWS Solutions Implementation)
Customizing account configuration with AWS Control Tower lifecycle events (AWS Management & Governance Blog)
Self-service VPCs in AWS Control Tower using AWS Service Catalog (AWS Management & Governance Blog)

“AWS multi-account automation utopia” was published on June 6, 2021.

---

Back to the home page

The content for this site is CC-BY-SA. The code for this site is MIT.