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 回答
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
支持工程师
已回答 2 年前
  • 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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则