Restricted Elastic Beanstalk deployment policy: Part 2

February 6, 2018 - 1 minutes

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "EC2EnvironmentInstances",
            "Effect": "Allow",
            "Action": [
                "ec2:*"
            ],
            "Resource": [
                "arn:aws:ec2:AWS_REGION:AWS_ACCOUNT:instance/*"
            ],
            "Condition": {
                "StringEquals": {
                    "ec2:ResourceTag/elasticbeanstalk:environment-name": [
                        "ENVIRONMENT_NAME"
                    ]
                }
            }
        }
    ]
}