Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what permissions I need for aws ec2 wait

-bash-4.2$ aws ec2 wait instance-running $ARG

Waiter InstanceRunning failed: You are not authorized to perform this operation.

Now you go to IAM and see a Huge list of permissions, none with wait word..., so you look into https://docs.aws.amazon.com/cli/latest/reference/ec2/wait/index.html#cli-aws-ec2-wait and find no list of needed permissions...

So: what permissions I need for aws ec2 wait?..

like image 967
Vao Tsun Avatar asked Jan 25 '26 13:01

Vao Tsun


1 Answers

purely by trying and failing I found those, that worked for me :

{
    "Version": "1980-09-19",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "ec2:StartInstances",
                "ec2:StopInstances"
            ],
            "Resource": "arn:aws:ec2:us-east-1:00000000:instance/i-abababababab"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "ec2:DescribeInstances",
                "ec2:ReportInstanceStatus"
            ],
            "Resource": "*"
        }
    ]
}

I assume you don't need start and stop to just wait, but I included them, because you use wait in pair with either of them...

so in short those are: DescribeInstances and ReportInstanceStatus

like image 88
Vao Tsun Avatar answered Jan 27 '26 05:01

Vao Tsun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!