简体   繁体   中英

AWS Elastic Beanstalk - Multi Container Docker

We have plan to implement AWS Elastic Beanstalk with Multi Container Docker. I have a IAM user with full access for all services. I have created docker image and pushed to AWS Elastic Container service successfully. When I deploy docker image (.json) to server using AWS Elastic Beanstalk, I got the below Issue. Please guide me for solution. I have checked the IAM user policy and add Amazon ECS,Elastic Beanstalk full access. I have list my .json code for your ref..

Json Code:

{
  "AWSEBDockerrunVersion": "2",  
"containerDefinitions": [

{

      "name": "agshift_strawberry",
      "image": "705395670584.dkr.ecr.us-west-2.amazonaws.com/agshift_strawberry:latest",
      "essential": true,
      "memory": 512,
      "portMappings": [
        {
          "hostPort": 80,
          "containerPort": 80
        }
      ]
}

]
}

Error:

ECS task stopped due to: Essential container in task exited. (agshift_strawberry: CannotPullContainerError: AccessDeniedException: User: arn:aws:sts::705395670584:assumed-role/aws-elasticbeanstalk-ec2-role/i-05f177a336c68b998 is not authorized to perform: ecr:GetAuthorizationToken on resource: * status code: 400, request id: c37a11c1-)

  1. Open the IAM Console
  2. Click on Roles
  3. Find the aws-elasticbeanstalk-ec2-role
  4. Add a policy that includes ecr:GetAuthorizationToken permission.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM