The CloudFormation doesn't manage or check resource creation limits during the deployment. The macro helps to deal with AWS API throttling during creating a lot of resources e.g. DynamoDB tables via CloudFormation. It creates different resource queues using DependsOn
statement.
- clone the repo
git clone https://github.com/vadymbat/aws-cf-concurrency-manager.git
- prepare CloudFormation template
aws cloudformation package --s3-bucket <your-s3-bucket> --template-file macro_template.yaml --output-template-file cf_concurrency_macro.yaml
- deploy the CloudFormation macro
aws cloudformation deploy --template-file cf_concurrency_macro.yaml --stack-name cf_concurrency_macro
- add "Transform" statement
Transform: CfConcurrencyMacro
- put
ConcurrencyNumber: <int>
to the root level of your template to set in how many threads your infrastructure will be deployed - (optional) fill
CommonDependancies: ["<ResourceLogicalId>"]
list of the resources which are dependencies of all resources in the stack
Check the example template for more details.