exam questions

Exam AWS DevOps Engineer Professional All Questions

View all questions & answers for the AWS DevOps Engineer Professional exam

Exam AWS DevOps Engineer Professional topic 1 question 64 discussion

Exam question from Amazon's AWS DevOps Engineer Professional
Question #: 64
Topic #: 1
[All AWS DevOps Engineer Professional Questions]

A company that runs many workloads on AWS has an Amazon EBS spend that has increased over time. The DevOps team notices there are many unattached
EBS volumes. Although there are workloads where volumes are detached, volumes over 14 days old are stale and no longer needed. A DevOps engineer has been tasked with creating automation that deletes unattached EBS volumes that have been unattached for 14 days.
Which solution will accomplish this?

  • A. Configure the AWS Config ec2-volume-inuse-check managed rule with a configuration changes trigger type and an Amazon EC2 volume resource target. Create a new Amazon CloudWatch Events rule scheduled to execute an AWS Lambda function in 14 days to delete the specified EBS volume.
  • B. Use Amazon EC2 and Amazon Data Lifecycle Manager to configure a volume lifecycle policy. Set the interval period for unattached EBS volumes to 14 days and set the retention rule to delete. Set the policy target volumes as *.
  • C. Create an Amazon CloudWatch Events rule to execute an AWS Lambda function daily. The Lambda function should find unattached EBS volumes and tag them with the current date, and delete unattached volumes that have tags with dates that are more than 14 days old.
  • D. Use AWS Trusted Advisor to detect EBS volumes that have been detached for more than 14 days. Execute an AWS Lambda function that creates a snapshot and then deletes the EBS volume.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
WhyIronMan
Highly Voted 3 years, 7 months ago
I'll go with C Reference: https://aws.amazon.com/blogs/mt/controlling-your-aws-costs-by-deleting-unused-amazon-ebs-volumes/
upvoted 27 times
JohnnieWalker
3 years, 7 months ago
There are two correct answers in this question and not much of a reason to pick one over another, very poorly put. I will go with C. A. AWS Config nope B. Data Lifecycle Manager nope C. Lambda does the job and completely remove, no snapshots. The question says "stale and no longer needed", so I think that is the way to go. Trust Advisor and Lambda works too, but the difference here is that this one creates a snapshot, so should we keep or not? If the question says "stale and no longer needed" I don't think we should.
upvoted 10 times
MBJames
3 years, 7 months ago
I'd go with D. The way C is described, it would run daily and tag unattached EBS volumes with current date. This means that unattached EBS volumes will keep receiving the current date every day, and the date will never become 14 days old to be deleted. To be correct, C should have said that volumes already having the tag would not be tagged again, but that's not indicated. D is a much cleaner way of doing things as it does not relies on these logic faults.
upvoted 5 times
...
...
...
Wrd123456789
Highly Voted 3 years, 7 months ago
D: https://github.com/aws/Trusted-Advisor-Tools/tree/master/UnderutilzedEBSVolumes This is a serverless (Lambda) application that reacts to Trusted Advisor warnings via CloudWatch rules to detect and delete Underutilized EBS volumes - volumes that have been unattached or had low I/O for a number of days. The app will only delete idle, unattached volumes after successfully taking a snapshot. It sends an email with information on how to recover the volume from the snapshot.
upvoted 10 times
justfmm
3 years, 7 months ago
https://docs.aws.amazon.com/awssupport/latest/user/trusted-advisor-check-reference.html#underutilized-amazon-ebs-volumes
upvoted 3 times
...
...
DaddyDee
Most Recent 1 year, 9 months ago
I will go with C: Here are tolls that can be used to automate this: https://catalog.workshops.aws/msft-costopt/en-US/storage/ebs/unattached-ebs-volumes https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/delete-unused-amazon-elastic-block-store-amazon-ebs-volumes-by-using-aws-config-and-aws-systems-manager.html B is not correct because Amazon Data Lifecycle Manager manages EBS snapshots not volumes and EBS backed AMIs https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html
upvoted 1 times
...
lunt
1 year, 10 months ago
Selected Answer: C
A - only checks if volume or related instance is marked for termination/deletion. Nope. B. DLM cannot detect unattached volumes. Go actually try & configure it. You filter on tag & say delete volume after 14 days but you cannot specify if its attach or not - just tag filtering. D. Does not work. C. Only viable option.
upvoted 1 times
...
asfsdfsdf
2 years, 3 months ago
Selected Answer: C
Force to choose C A. will not work correctly. B. DLM can work only with snapshots C. Correct D. Trusted advisor cannot check for unattached EBS for 14 days - it can only check for underutilized volumes - those volumes can also be attached and the check is for 7 days. "Yellow: A volume is unattached or had less than 1 IOPS per day for the past 7 days."
upvoted 3 times
...
Piccaso
2 years, 3 months ago
Selected Answer: B
Data Lifecycle Manager is the most straightforward solution https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html
upvoted 1 times
...
Bulti
2 years, 4 months ago
Correct answer is C. D is incorrect because Trusted Advisor detects only under provisioned and over provisioned EBS volume meaning utilization. If the EBS volume is already deattached and not utilized by any EC2 instance, then I don't think Trusted Advisor would detect that. I am not very sure about it but that's my guess. C seems logically correct. Some folks didn't select C because they thought Lambda will tag the unattached EBS volume each day ( again and again). But thats not true. Lambda will do so only once per EBS volume and therefore will be able to detect if a specifc volume was unused for 14 days and then delete it.
upvoted 2 times
...
PepsNick
2 years, 4 months ago
Selected Answer: C
It should be C not B. Data Lifecycle Manager is for EBS snapshots not the volume. https://aws.amazon.com/blogs/storage/automating-amazon-ebs-snapshot-and-ami-management-using-amazon-dlm/
upvoted 1 times
...
saeidp
2 years, 4 months ago
Selected Answer: C
I'll go with C
upvoted 2 times
...
SatenderRathee
2 years, 5 months ago
Selected Answer: C
https://aws.amazon.com/blogs/mt/controlling-your-aws-costs-by-deleting-unused-amazon-ebs-volumes/
upvoted 2 times
...
tinyflame
2 years, 6 months ago
Selected Answer: C
Amazon Data Lifecycle Manager cannot discover unattached disks and AWS Trusted Advisor can only discover currently unattached disks This question has a complicated request, so I have no choice but to rely on the Lambda function
upvoted 2 times
...
srikanth923
2 years, 6 months ago
I will go with C A. AWS Config Checks if EBS volumes are attached to EC2 instances. If the volume is 'available state', then you configure CloudWatch Event to invoke a Lambda function. Lambda function will take care of deletion. Note that Config does not only trigger unused EBS volumes for 14 days, but every unused EBS volume(irrespective of the number of days its been unused). Though it can be made work, its not the most efficient solution B. Data Lifecycle Manager only looks at EBS snapshot lifecycle. Not the EBS volumes itself C. Lambda function triggered periodically and tagging the new volumes and checking if already tagged volumes are >= 14 days old. If it finds any >= 14 days old, Lambda will delete them 4. Trusted advisor does not check for unused volumes, it checks for under utilised EBS volumes So C is the best answer in this context.
upvoted 3 times
...
RightAnswers
2 years, 8 months ago
Selected Answer: A
At first I thought Ans D seems the best option - but this answers creates a snapshot. creating a snapshot is not a requirement. So, A seems to be the best option.
upvoted 1 times
...
network_zeal
2 years, 8 months ago
Though few of the the answers are poorly worded, D seems to be best of the lot. With A it is not clear how config will identify it is 14 days since volume was unattached, B works with lifecycle of snapshots, not directly with lifecycle of volume, C has a logic flaw if date is updated D. That leaves D(though it is not clear how D will be automated and why it is creating snapshots before delete when not asked in Qs.)
upvoted 2 times
network_zeal
2 years, 8 months ago
With C, the lambda will update date tag daily with current date
upvoted 2 times
...
...
colinquek
2 years, 8 months ago
Selected Answer: B
honestly there is no correct ans here. the closest is C, it would hv been logically doable if the tagging of current date is mentioned AFTER the function/logic that detects & delete 14 days old EBS. I choose B still. Though tt "Use Amazon EC2 and Amazon Data Lifecycle Manager to configure a volume lifecycle policy" line sounds so wrong.
upvoted 1 times
...
ohcn
2 years, 8 months ago
D makes more sense. Trusted Advisor is designed to give you information about underutilized ebs volumes.
upvoted 1 times
...
jexam211
2 years, 9 months ago
Selected Answer: C
D maybe is valid, but i don't see any way to create a automatic way to detect, the C option at least is performing a daily task to validate the volumes
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...