Q: 15
A CloudOps engineer creates an AWS CloudFormation template to define an application stack that
can be deployed in multiple AWS Regions. The CloudOps engineer also creates an Amazon
CloudWatch dashboard by using the AWS Management Console. Each deployment of the application
requires its own CloudWatch dashboard.
How can the CloudOps engineer automate the creation of the CloudWatch dashboard each time the
application is deployed?
Options
Discussion
Makes sense to go with B here. CloudFormation lets you automate dashboard creation per deployment that way.
I get why B is best since using AWS::CloudWatch::Dashboard in the template lets every stack create its own dashboard automatically, with all the config you want. The CLI script (A) could work, but it’s not as integrated or hands-off, so pretty sure B lines up with AWS best practices here. Disagree?
B no contest
D imo. If CloudFormation keeps the dashboard name static then each deployment would just update the existing dashboard right?
B is the one I'd pick here since CloudFormation can provision a new CloudWatch dashboard each time using the exported JSON. That's the only way every stack gets its own copy, which matches "each deployment" in the question. Pretty sure this is what AWS expects for automation.
B for sure, exporting the dashboard JSON and using AWS::CloudWatch::Dashboard in your template lets CloudFormation handle it all. No need for manual CLI steps. Pretty standard practice here I think, unless I'm missing something.
B tbh. CloudFormation can create the dashboard each deploy using the exported JSON. No manual steps.
A had something like this in a mock and that's what I picked.
B not D. D would just overwrite the same dashboard every time, which isn't what you want if each deployment needs its own. B lets CloudFormation handle creating a new dashboard per stack, pretty sure that's what's needed in this scenario.
Option B makes sense, but I hesitate a bit since you have to export the dashboard JSON and paste it into the template. Still, that's the method that actually creates a new dashboard per stack automatically using CloudFormation. Not 100% sure since some folks mention scripting with CLI (A), but B feels like what AWS wants here. Agree?
Be respectful. No spam.