AllowStartStopEC2
Allow Start/Stop EC2: An IAM policy to grant users permission to start and stop specific EC2 instances. Securely manage EC2 actions with this policy.
AllowStartStopEC2
This IAM policy allows users to start and stop specific EC2 instances. It defines the permissions required to control EC2 instance actions within your AWS environment. Use this policy to grant granular access and enhance security.
IAM Policy for EC2 Start/Stop
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowStartStopEc2",
"Effect": "Allow",
"Action": [
"ec2:StartInstances",
"ec2:StopInstances"
],
"Resource": [
"arn:aws:ec2:eu-west-1:xxxxxxxxxxxx:instance/i-00000000000000000",
"arn:aws:ec2:eu-west-1:xxxxxxxxxxxx:instance/i-00000000000000001"
]
}
]
}
Explanation
This policy grants the ec2:StartInstances
and ec2:StopInstances
permissions to the specified EC2 instances. The Resource
array lists the Amazon Resource Names (ARNs) of the instances that the policy applies to.
Use Cases
- Granting developers the ability to start and stop their own EC2 instances.
- Allowing specific users to manage a set of EC2 instances for testing or development purposes.