Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cannot push image to public Repository on ECR #6691

Closed
h3110Fr13nd opened this issue Feb 14, 2024 · 3 comments
Closed

Bug: Cannot push image to public Repository on ECR #6691

h3110Fr13nd opened this issue Feb 14, 2024 · 3 comments

Comments

@h3110Fr13nd
Copy link

Description:

Pushing image to Public Repository on ECR gives Invalid Image Repository ECR URI
In samconfig.toml setting image_repository already doesn't work, while setting image_repositories work but only for private repos.

[default.deploy.parameters]
# ...
image_repositories = ["<Function Name>=public.ecr.aws/<some code>/<repo name>"]
# ...

Steps to reproduce:

Observed result:

Usage: sam deploy [OPTIONS]
Try 'sam deploy -h' for help.

Error: Invalid value for '--image-repository': Invalid Image Repository ECR URI: public.ecr.aws/<some code>/<repo name>

Expected result:

The Image should be pushed in my public repo, Similar to Private repos.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Ubuntu 22.04
  2. sam --version: SAM CLI, version 1.109.0
  3. AWS region: us-east-1
$ sam --info

# Output 
{
  "version": "1.109.0",
  "system": {
    "python": "3.11.3",
    "os": "Linux-6.5.0-15-generic-x86_64-with-glibc2.35"
  },
  "additional_dependencies": {
    "docker_engine": "25.0.2",
    "aws_cdk": "Not available",
    "terraform": "Not available"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}

Add --debug flag to command you are running

@h3110Fr13nd h3110Fr13nd added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Feb 14, 2024
@mildaniel
Copy link
Contributor

Hi @h3110Fr13nd, thanks for creating this issue. Lambda does not currently support image functions inside of public ECR. The image function must be in a private ECR inside of the same region and account.

@mildaniel mildaniel added type/question and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Feb 15, 2024
@h3110Fr13nd
Copy link
Author

h3110Fr13nd commented Feb 15, 2024

Hi @h3110Fr13nd, thanks for creating this issue. Lambda does not currently support image functions inside of public ECR. The image function must be in a private ECR inside of the same region and account.

So, This is an intended behaviour. And not a bug. Thank you for telling, @mildaniel.
I'm Closing the issue with "won't fix". As it is intended behaviour.
Still, I'll recommend to include this feature.

@h3110Fr13nd h3110Fr13nd closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants