Hot answers tagged

4

This error CannotPullContainerError usually occurs when you have no access to the Internet from ECS and thus it doesn't able to pull an image from registry. Make sure you have networking configured in such a way to have an access to Internet https://stackoverflow.com/questions/48226547/aws-fargate-cannotpullcontainererror-500 Manually you can confirm ...


3

The ImageTagMutability property in ECR is not currently supported in CloudFormation, as verified by experimentation (nor is it part of the LifecyclePolicy property). There is sometimes lag between feature availability in CloudFormation, and the mutability flag was only introduced in late July. This comes up elsewhere in the corners of AWS, including: AWS ...


2

AWS container service team member here. IF you are still early on in your journey to automate this via a CLI I would suggest you consider moving past the ecs-cli. The follow-on version of this CLI is called AWS Copilot and has more sophistication to implement those workflows. Note that Copilot dropped support for docker compose because we have implemented a ...


2

I will give it a try and explain all required steps with examples. Please add comments with questions and improvement suggestions if anything is not well enough explained. The OP (original poster) refers to awscli; while I provide corresponding examples, I also discuss limitations of this approach and give examples of doing same with Python. EC2 ...


1

The 'best approach' in a theory (coming from the perspective of k8s) would be GitOps: Cloud-native Continuous Deployment. Your question lack some important information, how are you doing your deployments right now ? Do you have some limitations in terms of security and auditability ? Sharing my personal 2 cents, using GitOps with ArgoCD outsource and ...


1

I use this script in gitlab-ci.yml image: docker:19.03 services: - docker:19.03.0-dind before_script: - $(aws ecr get-login --no-include-email --region eu-central-1) ... and provide AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY variables into Settings/CI-CD section. Ensure your region with images is the same where are you logging in.


1

Developers or even admins of your GitHub repository wouldn't be able to see secrets configured there by default. Even if you debug GitHub Actions workflows and accidentally log secrets, GitHub would mark them with ***. So the only attack vector I can think of is highly deliberate and it would require modifying GitHub Actions workflow code and egressing the ...


1

I think what you are doing wrong is the way you specify the credentialID to be used. Instead of 'awsId' try to use 'ecr:ap-southeast-1:awsId' docker.withRegistry('https://01234.dkr.ecr.ap-southeast-1.amazonaws.com/', 'ecr:ap-southeast-1:awsId') { def image = docker.image("01234.dkr.ecr.ap-southeast-1.amazonaws.com/tas/master-server:${env.BUILD_ID}") ...


1

ECR needs authentication and authorization before you can pull an image. In your ansible ecs_taskdefinition, please make sure you have parameter task_role_arn or execution_role_arn pointing to a role (i.e. you need to create a role my-task-role1). Attach the AWS managed policy AmazonECSTaskExecutionRolePolicy to the role (for Fargate tasks, the policy ...


Only top voted, non community-wiki answers of a minimum length are eligible