CFT to create New AWS Account

0

I need a CloudFormation Template that does the following things:

  1. Create a new AWS Account.
  2. Inside the newly created account it should create IAM User with Admin Permission.

A single CFT should do all!

1 Answer
1

Hello there!

There is no native support from CloudFormation (resource type) to create an account just like how we create other resources like S3 bucket using resource type AWS::S3::Bucket. Having said that, you can definitely use CloudFormation Custom Resources backed by Lambda to get it done.

Here is a 3rd party article that discusses the same and shows a custom resource that creates an account, OU and moves the account into the created OU. The template is subject to customisation and improving parametrisation as per your use case. Note that this is a purely CloudFormation based solution.

However if you are looking for a more end to end solution from automating account creation, configuration by automating common guardrails (compliance) and setting up tasks such as creating default users, etc., please check out this blog.

AWS
SUPPORT ENGINEER
answered a year ago
  • Hello, Thanks for your help! Actually, my need is that I have a Main AWS Account inside which I need to create multiple sandbox account for different peoples like Dev, Test, etc. After creating that account Dev or tester can do their separate work. Finally, I want a CFT that creates an AWS sandbox account and after that creates an IAM user inside them, and then Dev or tester can use it for their work.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions