Learn how to use AWS CloudFormation to deploy resources for geographic load testing of an API. Find out the best solution and the steps to implement it.
Table of Contents
Question
A developer needs to perform geographic load testing of an API. The developer must deploy resources to multiple AWS Regions to support the load testing of the API.
How can the developer meet these requirements without additional application code?
A. Create and deploy an AWS Lambda function in each desired Region. Configure the Lambda function to create a stack from an AWS CloudFormation template in that Region when the function is invoked.
B. Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI create-stack-set command to create a stack set in the desired Regions.
C. Create an AWS Systems Manager document that defines the resources. Use the document to create the resources in the desired Regions.
D. Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI deploy command to create a stack from the template in each Region.
Answer
B. Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI create-stack-set command to create a stack set in the desired Regions.
Explanation
The correct answer is B. Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI create-stack-set command to create a stack set in the desired Regions.
To perform geographic load testing of an API, the developer can use AWS CloudFormation to define and deploy the resources needed for the load test in multiple AWS Regions. AWS CloudFormation is a service that allows you to model and provision AWS and third-party application resources in your cloud environment using templates.
A stack set is a collection of AWS CloudFormation stacks that you can manage as a single unit. You can create, update, or delete stacks across multiple accounts and Regions with a single operation. You can use the AWS CLI create-stack-set command to create a stack set from a template and specify the Regions where you want to deploy the stacks.
Option A is incorrect because creating and deploying an AWS Lambda function in each desired Region is not necessary and adds additional complexity and cost. AWS Lambda is a service that lets you run code without provisioning or managing servers. You can use Lambda to create serverless applications or to run code in response to events. However, Lambda is not required for creating CloudFormation stacks in different Regions.
Option C is incorrect because creating an AWS Systems Manager document that defines the resources is not as simple and convenient as using a CloudFormation template. AWS Systems Manager is a service that helps you automate and manage your AWS and on-premises resources. You can use Systems Manager documents to define actions that you want Systems Manager to perform on your managed instances. However, Systems Manager documents are not designed for creating complex and interdependent resources like CloudFormation templates.
Option D is incorrect because using the AWS CLI deploy command to create a stack from the template in each Region is not as efficient and scalable as using the create-stack-set command. The deploy command is a high-level command that simplifies the process of creating and updating stacks. However, it only works for one Region at a time, so you would have to run it multiple times for each Region you want to deploy to. This can be error-prone and time-consuming, especially if you have many Regions to test.
The latest AWS Certified Developer – Associate DVA-C02 certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the AWS Certified Developer – Associate DVA-C02 exam and earn AWS Certified Developer – Associate DVA-C02 certification.