How should the company’s Solutions Architect automate the deployment of the application so that it can be MOST efficiently deployed into multiple regions?
Write a bash script that uses the AWS CLI to query the current state in one region and output a JSON representation. Pass the JSON representation to the AWS CLI, specifying the –region parameter to deploy the application to other regions.
Write a bash script that uses the AWS CLI to query the current state in one region and output an AWS CloudFormation template. Create a CloudFormation stack from the template by using the AWS CLI, specifying the –region parameter to deploy the application to other regions.
Write a CloudFormation template describing the application’s infrastructure in the resources section. Create a CloudFormation stack from the template by using the AWS CLI, specify multiple regions using the –regions parameter to deploy the application.
Write a CloudFormation template describing the application’s infrastructure in the Resources section. Use a CloudFormation stack set from an administrator account to launch stack instances that deploy the application to other regions.
Explanations:
Using a bash script with AWS CLI to query the current state and output a JSON representation would not be an efficient way to automate the deployment across multiple regions. It lacks the necessary infrastructure-as-code capabilities and could lead to inconsistencies in deployment across regions.
While generating a CloudFormation template via a bash script can be useful, it is not the most efficient method for deploying the application across multiple regions. This approach would require manual intervention to create the CloudFormation stack in each region, thus lacking full automation.
Although writing a CloudFormation template and deploying it via the AWS CLI is a valid approach, specifying multiple regions using the –regions parameter is not supported by AWS CLI. Each deployment would still need to be initiated separately for each region, which does not fully satisfy the requirement for efficient automation.
Using a CloudFormation template and CloudFormation StackSets allows for efficient deployment across multiple regions from a single template. StackSets manage deployments automatically across specified regions and accounts, ensuring consistency and reducing the complexity of multi-region deployments. This option fully meets the requirement for low-latency application deployment across different regions.