AWS Elastic Beanstalk [Resolved]: “… not authorized to perform: iam:CreateServiceLinkedRole on resource …”

How to resolve the Elastic Beanstalk ErrorĀ 

not authorized to perform CreateServiceLinkedRole error

ERROR

Creating load balancer failed Reason: API: elasticloadbalancing:CreateLoadBalancer User: arn:aws:iam::840750379902:user/eb_cli is not authorized to perform: iam:CreateServiceLinkedRole on resource: arn:aws:iam::840750379902:role/aws-service-role/elasticloadbalancing.amazonaws.com/AWSServiceRoleForElasticLoadBalancing

Resolved by adding the following inline policy to the group the user was attached to via IAM :

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "iam:CreateServiceLinkedRole",
            "Resource": "arn:aws:iam::*:role/aws-service-role/*"
        }
    ]
}

Leave a Reply

Your email address will not be published.