exam questions

Exam AWS Certified SysOps Administrator - Associate All Questions

View all questions & answers for the AWS Certified SysOps Administrator - Associate exam

Exam AWS Certified SysOps Administrator - Associate topic 1 question 388 discussion

A company has developed a service that is deployed on a fleet of Linux-based Amazon EC2 instances that are in an Auto Scaling group. The service occasionally fails unexpectedly because of an error in the application code. The company's engineering team determines that resolving the underlying cause of the service failure could take several weeks.

A SysOps administrator needs to create a solution to automate recovery if the service crashes on any of the EC2 instances.

Which solutions will meet this requirement? (Choose two.)

  • A. Install the Amazon CloudWatch agent on the EC2 instances. Configure the CloudWatch agent to monitor the service. Set the CloudWatch action to restart if the service health check fails.
  • B. Tag the EC2 instances. Create an AWS Lambda function that uses AWS Systems Manager Session Manager to log in to the tagged EC2 instances and restart the service. Schedule the Lambda function to run every 5 minutes.
  • C. Tag the EC2 instances. Use AWS Systems Manager State Manager to create an association that uses the AWS-RunShellScript document. Configure the association command with a script that checks if the service is running and that starts the service if the service is not running. For targets, specify the EC2 instance tag. Schedule the association to run every 5 minutes.
  • D. Update the EC2 user data that is specified in the Auto Scaling group's launch template to include a script that runs on a cron schedule every 5 minutes. Configure the script to check if the service is running and to start the service if the service is not running. Redeploy all the EC2 instances in the Auto Scaling group with the updated launch template.
  • E. Update the EC2 user data that is specified in the Auto Scaling group's launch template to ensure that the service runs during startup. Redeploy all the EC2 instances in the Auto Scaling group with the updated launch template.
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

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
KennethYY
1 week, 3 days ago
Selected Answer: AC
D/E look weird. one server application have issue, you redeploy all instance??
upvoted 1 times
...
numark
1 month ago
Selected Answer: CD
CD. Why not A? Cloud watch agent cannot restart a service which is what answer A states (not server). Systems Manager State Manager can ensure that the service is running as expected and can take corrective actions if it isn't. By scheduling the check every 5 minutes, the service can be quickly restarted if it crashes, effectively automating the recovery process.By using EC2 user data to deploy a script that periodically checks and ensures the service is running, you can achieve a self-recovery mechanism for the application. Since the script runs on the instance itself, it can restart the service without the need for external intervention. YOUR WELCOME
upvoted 1 times
0c2d840
2 weeks, 1 day ago
CloudWatch Alarm can be created to restart the EC2 instance as part of it's Action.
upvoted 1 times
...
numark
3 weeks, 2 days ago
Why not E? That answer only makes sure the service starts on initial launch, not checking afterwards.
upvoted 1 times
...
...
6022a06
1 month, 1 week ago
Selected Answer: CD
Vote C,D A is esclused, because CloudWatch doesn't seem restart process, but usally is used for restart the EC2 instance. B is esclused, because the lambda need login every time and in this case don't see any check if the service is running or not E is esclused, because this solutionn assicured that the service is running in initial phase, but after there isn't check if the service is running or not Remain C e D
upvoted 1 times
...
Idriss0
4 months ago
CD seems right because : A. Install the Amazon CloudWatch agent on the EC2 instances. Configure the CloudWatch agent to monitor the service. Set the CloudWatch action to restart if the service health check fails. While CloudWatch can monitor the service, it does not have the built-in capability to restart services directly on EC2 instances. Additional custom integration would be required to perform restarts, making it less straightforward than the chosen solutions.
upvoted 1 times
...
seetpt
9 months ago
Selected Answer: AC
AC seems right
upvoted 1 times
...
MomenAWS
9 months, 2 weeks ago
Selected Answer: AD
I think you all ignored the question request. It asks for two solutions, meaning each one should be valid. That being said, let's review the answers. -B: it doesn't give a complete solution. It is only will restart the service every 5. Min this doesn't apply to the question "automate recovery IF the service crashes on any of the EC2 instances." -E: In my opinion, this option is the same as B since it will guarantee the service is running on the startup; however, who knows what will happen next? -I think A is valid and straightforward, so it is either AC or AD I will go with "AD" because the instances in the ASG might change over time, so I don't know if this will affect the tags mentioned in the C option.
upvoted 1 times
...
stoy123
10 months, 1 week ago
Selected Answer: AC
A and C
upvoted 2 times
...
null0xAF
11 months ago
Selected Answer: AE
answer is AE Cloudwatch agent will restart Server if service is not running (A), server will restart with the service running(E), I don't see why it would be C if you are already monitoring with Cloudwatch agent, the agent literally has the ability to trigger a sns topic that can invoke the lambda function. . .
upvoted 4 times
...
tdlAws
11 months, 3 weeks ago
Maybe C and D
upvoted 1 times
...
nharaz
1 year ago
Selected Answer: AC
A and C are straight forward however is too complex. Use Systems Manager state - >Tag the EC2 instances for targeted management.>Use AWS Systems Manager State Manager to create an association that uses the AWS-RunShellScript document.>Configure the association to run a script that checks if the service is running and starts the service if it's not.>Schedule the association to run at regular intervals (e.g., every 5 minutes) to ensure continuous monitoring and recovery.
upvoted 2 times
nharaz
1 year ago
Typo error B is too complex
upvoted 1 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago