Topic 1 Question 20
A company uses an AWS CloudFormation template to provision an Amazon EC2 instance and an Amazon RDS DB instance. A SysOps administrator must update the template to ensure that the DB instance is created before the EC2 instance is launched. What should the SysOps administrator do to meet this requirement?
Add a wait condition to the template. Update the EC2 instance user data script to send a signal after the EC2 instance is started.
Add the DependsOn attribute to the EC2 instance resource, and provide the logical name of the RDS resource.
Change the order of the resources in the template so that the RDS resource is listed before the EC2 instance resource.
Create multiple templates. Use AWS CloudFormation StackSets to wait for one stack to complete before the second stack is created.
ユーザの投票
コメント(10)
B is the answer
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute.
👍 14RicardoD2021/10/03Answer is B. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
Syntax The DependsOn attribute can take a single string or list of strings.
"DependsOn" : [ String, ... ] Example The following template contains an AWS::EC2::Instance resource with a DependsOn attribute that specifies myDB, an AWS::RDS::DBInstance. When CloudFormation creates this stack, it first creates myDB, then creates Ec2Instance.
👍 6jkwek2021/11/06- 正解だと思う選択肢: B
Vote B
👍 2nqthien0412922021/11/19
シャッフルモード