A company wants to automate the installation of SAP software on AWS using AWS CloudFormation. Which service is most appropriate to execute the SAP installation scripts?
Run Command can execute scripts on instances with SSM Agent.
Why this answer
AWS Systems Manager Run Command is the most appropriate service because it can execute scripts (including SAP installation scripts) on EC2 instances without requiring SSH or RDP access, and it integrates with CloudFormation via custom resources or the AWS::SSM::Document resource. This allows you to run complex, long-running installation commands that are typical for SAP software, which Lambda functions cannot handle due to time limits.
Exam trap
The trap here is that candidates often choose AWS Lambda because it is a common 'automation' service, but they overlook Lambda's 15-minute execution timeout and its inability to handle long-running, stateful installations like SAP software.
How to eliminate wrong answers
Option A is wrong because AWS CodeDeploy is designed for deploying application code and managing rolling updates, not for executing standalone installation scripts like SAP installers. Option B is wrong because AWS Lambda functions have a maximum execution timeout of 15 minutes, which is insufficient for SAP installations that often take hours, and Lambda is not designed for interactive or long-running script execution. Option D is wrong because AWS OpsWorks for Chef Automate is a configuration management service that uses Chef cookbooks, which is overkill and not the simplest or most direct way to run a one-time SAP installation script; it adds unnecessary complexity and is not the recommended approach for this task.