Which solution will meet this requirement?
Configure AWS Systems Manager State Manager associations to bootstrap the EC2 instances with the required software at launch.
Use the Amazon CloudWatch agent to detect EC2 InstanceStart events and to inject the required software. Modify the InstanceRole IAM role to add permissions for the StartTask API operation.
Use Amazon Inspector to detect EC2 launch events. Configure Amazon Inspector to install the required software as part of lifecycle hooks for theEC2launch events.
Use AWS Security Hub remediation actions to install the required software at launch.
Explanations:
AWS Systems Manager State Manager allows you to automatically configure and install software on EC2 instances during launch by creating associations that run scripts or commands. This is the recommended solution for bootstrapping EC2 instances.
The CloudWatch agent does not handle software installation at launch. It is designed for monitoring and logging purposes, not software deployment. Additionally, the StartTask API is unrelated to installing software on EC2 instances.
Amazon Inspector is a security assessment service and does not perform software installation. It is used to analyze EC2 instances for vulnerabilities and configuration issues, not to install software during the launch process.
AWS Security Hub is a security monitoring service and does not manage software installation. Remediation actions in Security Hub are typically for security findings, not for installing or managing software on EC2 instances.