Exam DVA-C02 All QuestionsBrowse all questions from this exam
Question 47

An application uses an Amazon EC2 Auto Scaling group. A developer notices that EC2 instances are taking a long time to become available during scale-out events. The UserData script is taking a long time to run.

The developer must implement a solution to decrease the time that elapses before an EC2 instance becomes available. The solution must make the most recent version of the application available at all times and must apply all available security updates. The solution also must minimize the number of images that are created. The images must be validated.

Which combination of steps should the developer take to meet these requirements? (Choose two.)

    Correct Answer: B, C

    To decrease the time it takes for EC2 instances to become available and ensure the most recent version of the application is always available, along with applying all security updates, the developer should use EC2 Image Builder to create an AMI that includes the latest version of the application along with all necessary patches. This reduces the reliance on lengthy UserData scripts. Additionally, setting up AWS CodeDeploy allows the deployment of the most recent version at runtime, ensuring the application is always up-to-date without the need to frequently create new AMIs.

Discussion
imvb88Options: AE

Why choose A over B? Problem is that B will tie an AMI with a specific version, so if there is a new version, we need to create a new AMI, and that contradicts with "minimize the number of images that are created". Then E over C, D? E is obviously complementary to A, where removing commands from User Data will make the instance booting process much faster (and of course with A you don't need that anymore). C and D also works but 1/not complementary with any other options; 2/CodeDeploy takes time to execute. Hope this helps somebody struggling with this question.

yashika2005

thanksss a lott!

r3mo

And what about this requisit? "The solution must make the most recent version of the application available at all times". Only the Answer B fulfill this part.

minh12312312

The solution must make the most recent version of the application available at all times

[Removed]

I agree I think between A and B.- answer is B

KillThemWithKindnessOptions: AC

Option E, which suggests removing operating system patching from the UserData script, might reduce the startup time. But this could leave your instances unpatched and vulnerable, which doesn't meet the requirement to apply all available security updates.

maurice2005

well if u choose B and E then this will resolve as well

KarBiswaOptions: BE

The most practical answers

SerialiDrOptions: BE

B.Use EC2 Image Builder to create an Amazon Machine Image (AMI) that includes the latest version of the application and all necessary patches and agents required to manage and run the application. This approach allows instances to launch faster because it minimizes the amount of setup required after instance startup, reducing the reliance on lengthy UserData scripts for initial setup. E.Remove any commands that perform operating system patching from the UserData script. Operating system patching can significantly increase the time it takes for an instance to become available, especially if there are many updates to apply. By removing these commands and ensuring that the AMI used already includes the latest patches, the startup time can be reduced.

ufuomaapokiOptions: AC

The requirements are: 1. Decreasing the time it takes for EC2 instances to become available during scale-out events. 2. Ensuring the most recent version of the application is available. 3. Applying all available security updates. 4. Minimising the number of images created. [A] will satisfy requirements 1, 3, 4 [B] is similar to A, but will involve more AMI images [C] Since the applications are on EC2 instances, CodeDeploy will do just fine to update the applications to the most recent version [E] Removing any command for updates will leave our instances susceptible to vulnerabilities. Some commands can be removed, leaving the essential ones

maurice2005

B is faster than A. E delegates all run time to AMI build time on B option.

MrDurian

IMO the correct answer is A and C. Having a well set up AMI will reduce the need to run a long userData script. Why not using B? Because that would couple the image with the app version. It is better to trigger a Code deploy that will deploy the latest version of the app on the 'optimized' AMI. Regarding answer E, it would also be correct IMO but A and C seems to be the perfect matching scenario

IYNHOptions: AC

The solution must make the most recent version of the application available at all times. B doesn't make sense because "latest version at the time AMI is created" becomes outdated when a newer one comes. C is obviously needed to make the actual "latest" version deploy.

65703c1Options: BE

BE is the correct answer.

MarcosSantos

I choose BE. Is better response

ibratoev

A and E. A because number of images needs to be minimized. E to speed up the boot time.

Abdullah22Options: AC

going with ac

TheFivePipsOptions: AE

B would need a new image every time the application is updated, so it doesnt meet requirements. Obviously you should remove the thing that is causing the problem in the first place with E

konieczny69Options: DE

Answers: DE A and B sound good, but since you only have 2 options they are not enough. C is not enough. D is wider and can build an AMI. E is a must to speed it up.

Ashwinvdm22Options: AE

AE is correct.

BaYaga

Option A suggests using EC2 Image Builder to create an AMI and install all the patches and agents needed for the application. This ensures that the AMI is pre-configured with the necessary updates and configurations, reducing the time it takes for instances to become available during scale-out events. Option E recommends removing operating system patching from the UserData script. This is because, with EC2 Image Builder, the patches are applied during the AMI creation process, so there's no need to perform patching in the UserData script. This helps in minimizing the time it takes for instances to launch during scale-out events. It's A&E

xdkonorek2Options: AD

I think D > C "The solution must make the most recent version of the application available at all times" Most recent version of an application lives in source control and we need whole CI/CD for releasing this version which is use case for code pipeline, code deploy itself won't conduct the whole process