Skip to main content
IAM Policy Map

AWSElasticBeanstalkServiceRolePolicy

OperatorService-linked roleActivePermissions reviewedShow on mapCompare

Summary

AWS Elastic Beanstalk Service Linked Role policy which grants permissions to create & manage resources (i.e.: AutoScaling, EC2, S3, CloudFormation, ELB, etc.) on your behalf.

Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.

Identity

ARN
arn:aws:iam::aws:policy/aws-service-role/AWSElasticBeanstalkServiceRolePolicy
Default version
v8
Created
Last edited
Services
acm, aps, autoscaling, cloudformation, cloudwatch, codebuild, ec2, ecr, eks, elasticbeanstalk, elasticloadbalancing, iam, lambda, logs, s3, sns, sqs, tag

Control-plane actions (114)

By access level: 22 List, 40 Read, 11 Tagging, 41 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
Certificate Manager7 of 421 List, 2 Read, 2 Tagging, 2 Write; 7 restricted, 7 conditionalacm:AddTagsToCertificate, acm:DeleteCertificate, acm:DescribeCertificate, acm:ListCertificates, acm:ListTagsForCertificate, acm:RemoveTagsFromCertificate, acm:RequestCertificate
AMP14 of 6110 Read, 1 Tagging, 3 Write; 14 restricted, 14 conditionalaps:CreateWorkspace, aps:DeleteWorkspace, aps:Describe*, aps:RemoteWrite, aps:TagResource
EC2 Auto Scaling5 of 684 List, 1 Write; 0 restricted, 0 conditionalautoscaling:DescribeAutoScalingGroups, autoscaling:DescribeAutoScalingInstances, autoscaling:DescribeNotificationConfigurations, autoscaling:DescribeScalingActivities, autoscaling:PutNotificationConfiguration
CloudFormation8 of 1042 List, 3 Read, 3 Write; 8 restricted, 5 conditionalcloudformation:CreateStack, cloudformation:DeleteStack, cloudformation:DescribeStackEvents, cloudformation:DescribeStackResource, cloudformation:DescribeStackResources, cloudformation:DescribeStacks, cloudformation:ListStacks, cloudformation:UpdateStack
CloudWatch1 of 1601 Write; 1 restricted, 1 conditionalcloudwatch:PutDashboard
CodeBuild6 of 671 List, 2 Read, 3 Write; 6 restricted, 6 conditionalcodebuild:BatchGetBuilds, codebuild:BatchGetProjects, codebuild:CreateProject, codebuild:ListProjects, codebuild:StartBuild, codebuild:UpdateProject
EC212 of 8347 List, 2 Tagging, 3 Write; 7 restricted, 7 conditionalec2:AssociateAddress, ec2:AuthorizeSecurityGroupEgress, ec2:CreateSecurityGroup, ec2:CreateTags, ec2:DeleteTags, ec2:DescribeAddresses, ec2:DescribeInstanceStatus, ec2:DescribeInstances, ec2:DescribeRouteTables, ec2:DescribeSecurityGroups, ec2:DescribeSubnets, ec2:DescribeVpcs
Elastic Container Registry10 of 651 List, 5 Read, 2 Tagging, 2 Write; 10 restricted, 10 conditionalecr:BatchCheckLayerAvailability, ecr:BatchGetImage, ecr:CreateRepository, ecr:DescribeImages, ecr:DescribeRepositories, ecr:GetDownloadUrlForLayer, ecr:ListTagsForResource, ecr:PutLifecyclePolicy, ecr:TagResource, ecr:UntagResource
EKS18 of 742 List, 5 Read, 11 Write; 18 restricted, 18 conditionaleks:AssociateAccessPolicy, eks:CreateAccessEntry, eks:CreateAddon, eks:CreateCluster, eks:CreatePodIdentityAssociation, eks:DeleteAccessEntry, eks:DeleteAddon, eks:DeleteCluster, eks:DeletePodIdentityAssociation, eks:DescribeAccessEntry, eks:DescribeAddon, eks:DescribeCluster and 6 more
Elastic Beanstalk3 of 501 List, 2 Read; 3 restricted, 3 conditionalelasticbeanstalk:DescribeConfigurationSettings, elasticbeanstalk:DescribeEnvironments, elasticbeanstalk:DescribeEvents
ELB15 of 771 List, 6 Read, 2 Tagging, 6 Write; 11 restricted, 11 conditionalelasticloadbalancing:AddTags, elasticloadbalancing:CreateRule, elasticloadbalancing:CreateTargetGroup, elasticloadbalancing:DeleteRule, elasticloadbalancing:DeleteTargetGroup, elasticloadbalancing:DescribeInstanceHealth, elasticloadbalancing:DescribeListeners, elasticloadbalancing:DescribeLoadBalancers, elasticloadbalancing:DescribeRules, elasticloadbalancing:DescribeTags, elasticloadbalancing:DescribeTargetGroups, elasticloadbalancing:DescribeTargetHealth and 3 more
IAM3 of 1901 Read, 2 Write; 3 restricted, 3 conditionaliam:CreateServiceLinkedRole, iam:GetRole, iam:PassRole
Lambda1 of 1211 Read; 0 restricted, 0 conditionallambda:GetFunction
CloudWatch Logs5 of 1332 List, 3 Write; 5 restricted, 0 conditionallogs:CreateLogStream, logs:DeleteLogGroup, logs:DescribeLogGroups, logs:DescribeLogStreams, logs:PutLogEvents
S31 of 1551 Write; 1 restricted, 1 conditionals3:CreateBucket
SQS2 of 202 Read; 0 restricted, 0 conditionalsqs:GetQueueAttributes, sqs:GetQueueUrl
Resource Group Tagging3 of 91 Read, 2 Tagging; 3 restricted, 3 conditionaltag:GetResources, tag:TagResources, tag:UntagResources
Certificate Manager: 7 actions
  • acm:AddTagsToCertificate (Tagging)
  • acm:DeleteCertificate (Write)
  • acm:DescribeCertificate (Read)
  • acm:ListCertificates (List)
  • acm:ListTagsForCertificate (Read)
  • acm:RemoveTagsFromCertificate (Tagging)
  • acm:RequestCertificate (Write)
AMP: 14 actions
  • aps:CreateWorkspace (Write)
  • aps:DeleteWorkspace (Write)
  • aps:DescribeAlertManagerDefinition (Read)
  • aps:DescribeAnomalyDetector (Read)
  • aps:DescribeLoggingConfiguration (Read)
  • aps:DescribeQueryLoggingConfiguration (Read)
  • aps:DescribeResourcePolicy (Read)
  • aps:DescribeRuleGroupsNamespace (Read)
  • aps:DescribeScraper (Read)
  • aps:DescribeScraperLoggingConfiguration (Read)
  • aps:DescribeWorkspace (Read)
  • aps:DescribeWorkspaceConfiguration (Read)
  • aps:RemoteWrite (Write)
  • aps:TagResource (Tagging)
EC2 Auto Scaling: 5 actions
  • autoscaling:DescribeAutoScalingGroups (List)
  • autoscaling:DescribeAutoScalingInstances (List)
  • autoscaling:DescribeNotificationConfigurations (List)
  • autoscaling:DescribeScalingActivities (List)
  • autoscaling:PutNotificationConfiguration (Write)
CloudFormation: 8 actions
  • cloudformation:CreateStack (Write)
  • cloudformation:DeleteStack (Write)
  • cloudformation:DescribeStackEvents (Read)
  • cloudformation:DescribeStackResource (Read)
  • cloudformation:DescribeStackResources (Read)
  • cloudformation:DescribeStacks (List)
  • cloudformation:ListStacks (List)
  • cloudformation:UpdateStack (Write)
CloudWatch: 1 actions
  • cloudwatch:PutDashboard (Write)
CodeBuild: 6 actions
  • codebuild:BatchGetBuilds (Read)
  • codebuild:BatchGetProjects (Read)
  • codebuild:CreateProject (Write)
  • codebuild:ListProjects (List)
  • codebuild:StartBuild (Write)
  • codebuild:UpdateProject (Write)
EC2: 12 actions
  • ec2:AssociateAddress (Write)
  • ec2:AuthorizeSecurityGroupEgress (Write)
  • ec2:CreateSecurityGroup (Write)
  • ec2:CreateTags (Tagging)
  • ec2:DeleteTags (Tagging)
  • ec2:DescribeAddresses (List)
  • ec2:DescribeInstanceStatus (List)
  • ec2:DescribeInstances (List)
  • ec2:DescribeRouteTables (List)
  • ec2:DescribeSecurityGroups (List)
  • ec2:DescribeSubnets (List)
  • ec2:DescribeVpcs (List)
Elastic Container Registry: 10 actions
  • ecr:BatchCheckLayerAvailability (Read)
  • ecr:BatchGetImage (Read)
  • ecr:CreateRepository (Write)
  • ecr:DescribeImages (List)
  • ecr:DescribeRepositories (Read)
  • ecr:GetDownloadUrlForLayer (Read)
  • ecr:ListTagsForResource (Read)
  • ecr:PutLifecyclePolicy (Write)
  • ecr:TagResource (Tagging)
  • ecr:UntagResource (Tagging)
EKS: 18 actions
  • eks:AssociateAccessPolicy (Write)
  • eks:CreateAccessEntry (Write)
  • eks:CreateAddon (Write)
  • eks:CreateCluster (Write)
  • eks:CreatePodIdentityAssociation (Write)
  • eks:DeleteAccessEntry (Write)
  • eks:DeleteAddon (Write)
  • eks:DeleteCluster (Write)
  • eks:DeletePodIdentityAssociation (Write)
  • eks:DescribeAccessEntry (Read)
  • eks:DescribeAddon (Read)
  • eks:DescribeCluster (Read)
  • eks:DescribePodIdentityAssociation (Read)
  • eks:DescribeUpdate (Read)
  • eks:ListAssociatedAccessPolicies (List)
  • eks:ListPodIdentityAssociations (List)
  • eks:UpdateAddon (Write)
  • eks:UpdatePodIdentityAssociation (Write)
Elastic Beanstalk: 3 actions
  • elasticbeanstalk:DescribeConfigurationSettings (Read)
  • elasticbeanstalk:DescribeEnvironments (List)
  • elasticbeanstalk:DescribeEvents (Read)
ELB: 15 actions
  • elasticloadbalancing:AddTags (Tagging)
  • elasticloadbalancing:CreateRule (Write)
  • elasticloadbalancing:CreateTargetGroup (Write)
  • elasticloadbalancing:DeleteRule (Write)
  • elasticloadbalancing:DeleteTargetGroup (Write)
  • elasticloadbalancing:DescribeInstanceHealth (Read)
  • elasticloadbalancing:DescribeListeners (Read)
  • elasticloadbalancing:DescribeLoadBalancers (List)
  • elasticloadbalancing:DescribeRules (Read)
  • elasticloadbalancing:DescribeTags (Read)
  • elasticloadbalancing:DescribeTargetGroups (Read)
  • elasticloadbalancing:DescribeTargetHealth (Read)
  • elasticloadbalancing:ModifyTargetGroup (Write)
  • elasticloadbalancing:RemoveTags (Tagging)
  • elasticloadbalancing:SetSecurityGroups (Write)
IAM: 3 actions
  • iam:CreateServiceLinkedRole (Write)
  • iam:GetRole (Read)
  • iam:PassRole (Write)
Lambda: 1 actions
  • lambda:GetFunction (Read)
CloudWatch Logs: 5 actions
  • logs:CreateLogStream (Write)
  • logs:DeleteLogGroup (Write)
  • logs:DescribeLogGroups (List)
  • logs:DescribeLogStreams (List)
  • logs:PutLogEvents (Write)
S3: 1 actions
  • s3:CreateBucket (Write)
SQS: 2 actions
  • sqs:GetQueueAttributes (Read)
  • sqs:GetQueueUrl (Read)
Resource Group Tagging: 3 actions
  • tag:GetResources (Read)
  • tag:TagResources (Tagging)
  • tag:UntagResources (Tagging)

Data-plane actions (6)

By access level: 1 List, 1 Permissions management, 2 Read, 2 Write.

Data-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
S35 of 251 List, 1 Permissions management, 2 Read, 1 Write; 5 restricted, 5 conditionals3:GetObject, s3:GetObjectVersion, s3:ListBucket, s3:PutObject, s3:PutObjectAcl
SNSAll 1 actions (see the SNS page)1 Write; 0 restricted, 0 conditionalsns:Publish
S3: 5 actions
  • s3:GetObject (Read)
  • s3:GetObjectVersion (Read)
  • s3:ListBucket (List)
  • s3:PutObject (Write)
  • s3:PutObjectAcl (Permissions management)

Excluded and conditional actions

No patterns are excluded by NotAction or Deny statements.

Resource scope and attachment

Resource scope across granted actions: mixed.

Can be attached: No (service-linked role policy).

Why this tier

  • Grants 55 write, tagging or permissions-management actions, short of full control of any service.
  • Grants data-plane write actions on a data store, but only for scoped resources or under conditions.
  • Grants iam:PassRole, but only for scoped roles or under conditions (for example iam:PassedToService).

Guidance

Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.

Same service

Same domain

Frequently asked questions

Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.

Policy JSON

Download policy.json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowCloudformationReadOperationsOnElasticBeanstalkStacks",
      "Effect": "Allow",
      "Action": [
        "cloudformation:DescribeStackResource",
        "cloudformation:DescribeStackResources",
        "cloudformation:DescribeStacks"
      ],
      "Resource": [
        "arn:aws:cloudformation:*:*:stack/awseb-*",
        "arn:aws:cloudformation:*:*:stack/eb-*"
      ]
    },
    {
      "Sid": "AllowOperations",
      "Effect": "Allow",
      "Action": [
        "autoscaling:DescribeAutoScalingGroups",
        "autoscaling:DescribeAutoScalingInstances",
        "autoscaling:DescribeNotificationConfigurations",
        "autoscaling:DescribeScalingActivities",
        "autoscaling:PutNotificationConfiguration",
        "ec2:DescribeInstanceStatus",
        "ec2:AssociateAddress",
        "ec2:DescribeAddresses",
        "ec2:DescribeInstances",
        "ec2:DescribeSecurityGroups",
        "elasticloadbalancing:DescribeInstanceHealth",
        "elasticloadbalancing:DescribeLoadBalancers",
        "elasticloadbalancing:DescribeTargetHealth",
        "elasticloadbalancing:DescribeTargetGroups",
        "lambda:GetFunction",
        "sqs:GetQueueAttributes",
        "sqs:GetQueueUrl",
        "sns:Publish"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Sid": "AllowOperationsOnHealthStreamingLogs",
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogStream",
        "logs:DescribeLogGroups",
        "logs:DescribeLogStreams",
        "logs:DeleteLogGroup",
        "logs:PutLogEvents"
      ],
      "Resource": "arn:aws:logs:*:*:log-group:/aws/elasticbeanstalk/*"
    },
    {
      "Sid": "EBEKSGeneralOperations",
      "Effect": "Allow",
      "Action": [
        "acm:DescribeCertificate",
        "acm:ListCertificates",
        "acm:ListTagsForCertificate",
        "ec2:DescribeRouteTables",
        "ec2:DescribeSubnets",
        "ec2:DescribeVpcs",
        "ec2:DescribeSecurityGroups",
        "ecr:BatchCheckLayerAvailability",
        "ecr:BatchGetImage",
        "ecr:GetDownloadUrlForLayer",
        "ecr:DescribeRepositories",
        "ecr:ListTagsForResource",
        "elasticloadbalancing:DescribeLoadBalancers",
        "elasticloadbalancing:DescribeTargetHealth",
        "elasticloadbalancing:DescribeTags",
        "elasticloadbalancing:DescribeListeners",
        "elasticloadbalancing:DescribeRules",
        "elasticloadbalancing:DescribeTargetGroups",
        "iam:GetRole",
        "codebuild:ListProjects",
        "codebuild:BatchGetProjects",
        "tag:GetResources",
        "tag:TagResources",
        "tag:UntagResources",
        "elasticbeanstalk:DescribeEvents",
        "elasticbeanstalk:DescribeEnvironments",
        "elasticbeanstalk:DescribeConfigurationSettings"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSDefaultHTTPSCertCreate",
      "Effect": "Allow",
      "Action": [
        "acm:RequestCertificate"
      ],
      "Resource": "*",
      "Condition": {
        "Null": {
          "aws:RequestTag/elasticbeanstalk:environment-id": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSDefaultHTTPSCertModifyDelete",
      "Effect": "Allow",
      "Action": [
        "acm:AddTagsToCertificate",
        "acm:DeleteCertificate"
      ],
      "Resource": "*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/elasticbeanstalk:environment-id": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSSubnetTag",
      "Effect": "Allow",
      "Action": [
        "ec2:CreateTags"
      ],
      "Resource": "arn:aws:ec2:*:*:subnet/*",
      "Condition": {
        "ForAllValues:StringEquals": {
          "aws:TagKeys": [
            "kubernetes.io/role/elb",
            "kubernetes.io/role/internal-elb"
          ]
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSIamCreateServiceLinkedRole",
      "Effect": "Allow",
      "Action": [
        "iam:CreateServiceLinkedRole"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "iam:AWSServiceName": "eks.amazonaws.com"
        }
      }
    },
    {
      "Sid": "EBEKSIamPermissionsImageBuild",
      "Effect": "Allow",
      "Action": [
        "iam:PassRole"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "iam:PassedToService": [
            "codebuild.amazonaws.com",
            "eks.amazonaws.com",
            "ec2.amazonaws.com",
            "pods.eks.amazonaws.com",
            "elasticbeanstalk.amazonaws.com"
          ]
        }
      }
    },
    {
      "Sid": "EBEKSS3Permissions",
      "Effect": "Allow",
      "Action": [
        "s3:CreateBucket",
        "s3:GetObjectVersion",
        "s3:GetObject",
        "s3:ListBucket",
        "s3:PutObject",
        "s3:PutObjectAcl"
      ],
      "Resource": [
        "arn:aws:s3:::elasticbeanstalk-*",
        "arn:aws:s3:::elasticbeanstalk-*/*"
      ],
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSEKSClusterManagement",
      "Effect": "Allow",
      "Action": [
        "eks:CreateCluster",
        "eks:DeleteCluster",
        "eks:DescribeCluster",
        "eks:DescribeUpdate",
        "eks:CreateAccessEntry",
        "eks:DeleteAccessEntry",
        "eks:CreateAddon",
        "eks:CreatePodIdentityAssociation",
        "eks:ListPodIdentityAssociations"
      ],
      "Resource": "arn:aws:eks:*:*:cluster/beanstalk-cluster*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSEKSAddonManagement",
      "Effect": "Allow",
      "Action": [
        "eks:DeleteAddon",
        "eks:DescribeAddon",
        "eks:UpdateAddon"
      ],
      "Resource": "arn:aws:eks:*:*:addon/beanstalk-cluster*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSEKSAccessEntryManagement",
      "Effect": "Allow",
      "Action": [
        "eks:AssociateAccessPolicy",
        "eks:DescribeAccessEntry",
        "eks:ListAssociatedAccessPolicies"
      ],
      "Resource": "arn:aws:eks:*:*:access-entry/beanstalk-cluster*/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSEKSPodIdentityManagement",
      "Effect": "Allow",
      "Action": [
        "eks:DeletePodIdentityAssociation",
        "eks:DescribePodIdentityAssociation",
        "eks:UpdatePodIdentityAssociation"
      ],
      "Resource": "arn:aws:eks:*:*:podidentityassociation/beanstalk-cluster*/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSCodeBuildProjectManagement",
      "Effect": "Allow",
      "Action": [
        "codebuild:CreateProject",
        "codebuild:UpdateProject",
        "codebuild:StartBuild",
        "codebuild:BatchGetBuilds",
        "codebuild:BatchGetProjects"
      ],
      "Resource": "arn:aws:codebuild:*:*:project/elasticbeanstalk-*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSECRRepositoryManagement",
      "Effect": "Allow",
      "Action": [
        "ecr:CreateRepository",
        "ecr:DescribeRepositories",
        "ecr:DescribeImages",
        "ecr:PutLifecyclePolicy",
        "ecr:TagResource"
      ],
      "Resource": "arn:aws:ecr:*:*:repository/elasticbeanstalk-*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSCFNStackManagementImageBuild",
      "Effect": "Allow",
      "Action": [
        "cloudformation:CreateStack",
        "cloudformation:UpdateStack",
        "cloudformation:DescribeStacks",
        "cloudformation:DescribeStackEvents"
      ],
      "Resource": [
        "arn:aws:cloudformation:*:*:stack/elasticbeanstalk-*-image-build",
        "arn:aws:cloudformation:*:*:stack/elasticbeanstalk-*-image-build/*"
      ],
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSCFNStackManagementClusterSetup",
      "Effect": "Allow",
      "Action": [
        "cloudformation:CreateStack",
        "cloudformation:DeleteStack",
        "cloudformation:DescribeStackEvents",
        "cloudformation:DescribeStacks",
        "cloudformation:ListStacks",
        "cloudformation:UpdateStack"
      ],
      "Resource": [
        "arn:aws:cloudformation:*:*:stack/beanstalk-*"
      ],
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSAPSCreateWorkspace",
      "Effect": "Allow",
      "Action": [
        "aps:CreateWorkspace",
        "aps:TagResource"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "aws:RequestTag/CreatedBy": "ElasticBeanstalk",
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSAPSManageWorkspace",
      "Effect": "Allow",
      "Action": [
        "aps:DeleteWorkspace",
        "aps:Describe*"
      ],
      "Resource": "arn:aws:aps:*:*:workspace/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "aws:ResourceTag/CreatedBy": "ElasticBeanstalk"
        }
      }
    },
    {
      "Sid": "EBEKSAPSRemoteWrite",
      "Effect": "Allow",
      "Action": [
        "aps:RemoteWrite"
      ],
      "Resource": "arn:aws:aps:*:*:workspace/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "aws:ResourceTag/CreatedBy": "ElasticBeanstalk"
        }
      }
    },
    {
      "Sid": "EBEKSCreateDashboard",
      "Effect": "Allow",
      "Action": "cloudwatch:PutDashboard",
      "Resource": "arn:aws:cloudwatch::*:dashboard/ElasticBeanstalk-Observability-*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbLoadBalancerWrite",
      "Effect": "Allow",
      "Action": [
        "elasticloadbalancing:SetSecurityGroups",
        "elasticloadbalancing:AddTags"
      ],
      "Resource": "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbTargetGroupCreate",
      "Effect": "Allow",
      "Action": [
        "elasticloadbalancing:CreateTargetGroup",
        "elasticloadbalancing:AddTags"
      ],
      "Resource": "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
      "Condition": {
        "Null": {
          "aws:RequestTag/elasticbeanstalk:environment-id": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbTargetGroupModifyDelete",
      "Effect": "Allow",
      "Action": [
        "elasticloadbalancing:ModifyTargetGroup",
        "elasticloadbalancing:DeleteTargetGroup",
        "elasticloadbalancing:AddTags"
      ],
      "Resource": "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/elasticbeanstalk:environment-id": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbListenerRuleCreate",
      "Effect": "Allow",
      "Action": [
        "elasticloadbalancing:CreateRule",
        "elasticloadbalancing:AddTags"
      ],
      "Resource": [
        "arn:aws:elasticloadbalancing:*:*:listener/app/*/*/*",
        "arn:aws:elasticloadbalancing:*:*:listener-rule/app/*/*/*"
      ],
      "Condition": {
        "Null": {
          "aws:RequestTag/elasticbeanstalk:environment-id": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbListenerRuleDelete",
      "Effect": "Allow",
      "Action": [
        "elasticloadbalancing:DeleteRule"
      ],
      "Resource": "arn:aws:elasticloadbalancing:*:*:listener-rule/app/*/*/*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/elasticbeanstalk:environment-id": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbEC2CreateSecurityGroup",
      "Effect": "Allow",
      "Action": [
        "ec2:CreateSecurityGroup"
      ],
      "Resource": "arn:aws:ec2:*:*:security-group/*",
      "Condition": {
        "Null": {
          "aws:RequestTag/elasticbeanstalk:byo-alb-arn": "false",
          "aws:RequestTag/elasticbeanstalk:managed": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbEC2CreateSecurityGroupVpc",
      "Effect": "Allow",
      "Action": [
        "ec2:CreateSecurityGroup"
      ],
      "Resource": "arn:aws:ec2:*:*:vpc/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbEC2CreateTags",
      "Effect": "Allow",
      "Action": [
        "ec2:CreateTags"
      ],
      "Resource": "arn:aws:ec2:*:*:security-group/*",
      "Condition": {
        "Null": {
          "aws:RequestTag/elasticbeanstalk:byo-alb-arn": "false",
          "aws:RequestTag/elasticbeanstalk:managed": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "ec2:CreateAction": "CreateSecurityGroup"
        }
      }
    },
    {
      "Sid": "EBEKSByoAlbEC2SecurityGroupEgress",
      "Effect": "Allow",
      "Action": [
        "ec2:AuthorizeSecurityGroupEgress"
      ],
      "Resource": "arn:aws:ec2:*:*:security-group/*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/elasticbeanstalk:byo-alb-arn": "false",
          "aws:ResourceTag/elasticbeanstalk:managed": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "ECRTagMutation",
      "Effect": "Allow",
      "Action": [
        "ecr:TagResource",
        "ecr:UntagResource"
      ],
      "Resource": "*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/elasticbeanstalk:application-name": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "CodeBuildTagMutation",
      "Effect": "Allow",
      "Action": "codebuild:UpdateProject",
      "Resource": "*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/elasticbeanstalk:application-name": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "TagMutation",
      "Effect": "Allow",
      "Action": [
        "acm:AddTagsToCertificate",
        "acm:RemoveTagsFromCertificate",
        "elasticloadbalancing:AddTags",
        "elasticloadbalancing:RemoveTags",
        "ec2:CreateTags",
        "ec2:DeleteTags"
      ],
      "Resource": "*",
      "Condition": {
        "Null": {
          "aws:ResourceTag/elasticbeanstalk:environment-id": "false"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    }
  ]
}

Version history

Current version v8, edited by AWS on 2026-08-18. Version history is recorded from 2026-11-11. Earlier versions are in the IAM console under Policy versions.

Attach snippets

This policy cannot be attached to users, groups or roles, so there are no attach snippets.

Sources

Pending editorial review. No editorial sources are listed yet.