AWS Certified SysOps Administrator – Associate (legacy) — Question 751
A SysOps administrator must run a script on production servers to fix an issue. The company has a policy to block all remote interactive access to production servers.
Based on this situation, how should the administrator run the script?
Answer options
- A. Share and use the Amazon EC2 key pairs to gain access to the servers and run the script.
- B. Put the script into the user data of the instances.
- C. Configure the script to run as a cron job or scheduled task on the EC2 instances.
- D. Use AWS Systems Manager to run the script.
Correct answer: C
Explanation
Configuring the script as a cron job or scheduled task allows it to execute automatically on the EC2 instances without requiring any interactive remote sessions, adhering to the company's security policy. Sharing EC2 key pairs for interactive access violates the policy, and user data scripts only execute during the initial launch of the instance rather than on already running production servers.