{"id":20472797,"url":"https://github.com/greathayat/aws-ecr-docker","last_synced_at":"2026-04-07T20:31:19.477Z","repository":{"id":236659231,"uuid":"617463068","full_name":"GreatHayat/aws-ecr-docker","owner":"GreatHayat","description":"This repository will help you to understand, how to push your docker image to AWS ECR","archived":false,"fork":false,"pushed_at":"2023-03-26T21:32:12.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T13:52:19.687Z","etag":null,"topics":["aws","aws-containers","aws-ecr","aws-iam","aws-iam-policies","docker","docker-image","private-docker-registry"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GreatHayat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-22T12:56:14.000Z","updated_at":"2023-03-22T21:38:21.000Z","dependencies_parsed_at":"2024-04-28T05:47:25.601Z","dependency_job_id":null,"html_url":"https://github.com/GreatHayat/aws-ecr-docker","commit_stats":null,"previous_names":["greathayat/aws-ecr-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GreatHayat/aws-ecr-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Faws-ecr-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Faws-ecr-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Faws-ecr-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Faws-ecr-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GreatHayat","download_url":"https://codeload.github.com/GreatHayat/aws-ecr-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreatHayat%2Faws-ecr-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31528262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-containers","aws-ecr","aws-iam","aws-iam-policies","docker","docker-image","private-docker-registry"],"created_at":"2024-11-15T14:21:59.853Z","updated_at":"2026-04-07T20:31:19.459Z","avatar_url":"https://github.com/GreatHayat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS ECR\n\n`This repository will help you to understand, how to push your docker images to AWS ECR using Github actions`\n\n## STEPS\n\n1. \u003cb\u003eCREATE PRIVATE REPOSITORY IN ECR\u003c/b\u003e\n\n- Login to you AWS account\n- Go to `AWS Container Registry` service and create a `private` repository\n- Create Private Repository with a suitable name\n\n2. \u003cb\u003eCREATE IAM USER\u003c/b\u003e\n\n- Create IAM user and create an inline policy\n- An Inline policy will allow the IAM user to login to ECR, build and tag docker images and push docker images to `AWS ECR`\n\n### Policy Examples\n\n1. The following policy will enable user to push docker images to `any ECR registry`\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ecr:CompleteLayerUpload\",\n                \"ecr:GetAuthorizationToken\",\n                \"ecr:UploadLayerPart\",\n                \"ecr:InitiateLayerUpload\",\n                \"ecr:BatchCheckLayerAvailability\",\n                \"ecr:PutImage\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n}\n```\n\n2. The following policy will enable/restrict user to push docker images to a `specific ECR registry`\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"ecr:CompleteLayerUpload\",\n                \"ecr:UploadLayerPart\",\n                \"ecr:InitiateLayerUpload\",\n                \"ecr:BatchCheckLayerAvailability\",\n                \"ecr:PutImage\"\n            ],\n            \"Resource\": \"arn:aws:ecr:region:111122223333:repository/repository-name\"\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": \"ecr:GetAuthorizationToken\",\n            \"Resource\": \"*\"\n        }\n    ]\n}\n```\n\n## How to use the Github Action workFlow (used in this repository)\n\n\u003cb\u003eSet the following secret variables in your repository secrets\u003c/b\u003e\n\n- `AWS_ACCESS_KEY_ID`\n- `AWS_SECREST_ACCESS_KEY`\n- `AWS_ECR_REGION`\n- `ECR_REPOSITORY_NAME`\n\n\n#### HAPPY CLOUD LEARNING\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreathayat%2Faws-ecr-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreathayat%2Faws-ecr-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreathayat%2Faws-ecr-docker/lists"}