How do I set up and use EC2 Run Command with my EC2 instances running Linux?
How do I set up and use Amazon EC2 Run Command with my Amazon EC2 instances running Linux?
The operating system of your EC2 instance running Linux is supported by Simple Systems Manager (SSM), and the instance is running in a supported region.
The IAM role associated with your instance has an attached policy that allows it to communicate with the Run Command API (for example, the AmazonEC2RoleforSSM policy).
The IAM user that will interact with the instance has an attached policy that allows use of SSM (for example, the AmazonSSMFullAccess policy).
Your EC2 instance has outbound access to the Internet (through an Internet Gateway or NAT gateway).
If these conditions are true, begin by installing the SSM agent on your instance. For detailed instructions for each supported operating system, see Installing the SSM Agent.
After the SSM agent is installed, you can run commands on your EC2 instances from the EC2 console, AWS CLI, or the SSM API.