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

--image_repositories not working #6630

Closed
jorgesisco opened this issue Jan 31, 2024 · 3 comments
Closed

--image_repositories not working #6630

jorgesisco opened this issue Jan 31, 2024 · 3 comments
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale.

Comments

@jorgesisco
Copy link

I am working on a shell script that ends up creating a final command based on recent version tag for each one of the repos I have for each lambda.

In the --image-repositories I am providing the URIs to sam deploy and in --parameter-overrides I provide the URI in order to be able to included in the template.yaml I already defined the parameter names in the template.

sam deploy --image-repositories ServiformProxyEventLambda=123456678.dkr.ecr.eu-central-1.amazonaws.com/serviform-api-proxy:v0.0.8 TextClassifierReq=123456789.dkr.ecr.eu-central-1.amazonaws.com/text-classifier-req:v0.1.0 SFTPEventLambda=123456789.dkr.ecr.eu-central-1.amazonaws.com/sftp-req-jud:v0.1.3 NerReq=123456789.dkr.ecr.eu-central-1.amazonaws.com/ner-req:v0.2.5 ProcessEmailLambda=123456789.dkr.ecr.eu-central-1.amazonaws.com/etl-email-images:v1.2.3 Serviform=123456789.dkr.ecr.eu-central-1.amazonaws.com/serviform:v0.3.3 \
--parameter-overrides ServiformProxyEventLambdaImageUri=123456789.dkr.ecr.eu-central-1.amazonaws.com/serviform-api-proxy:v0.0.8 TextClassifierReqImageUri=123456789.dkr.ecr.eu-central-1.amazonaws.com/text-classifier-req:v0.1.0 SFTPEventLambdaImageUri=123456789.dkr.ecr.eu-central-1.amazonaws.com/sftp-req-jud:v0.1.3 NerReqImageUri=123456789.dkr.ecr.eu-central-1.amazonaws.com/ner-req:v0.2.5 ProcessEmailLambdaImageUri=123456789.dkr.ecr.eu-central-1.amazonaws.com/etl-email-images:v1.2.3 ServiformImageUri=123456789.dkr.ecr.eu-central-1.amazonaws.com/serviform:v0.3.3

The issue is that I am getting the following error:

Error: Invalid value for '--image-repositories': --image-repositories is not a valid format, it needs to be of the form function_logical_id=ECR_URI

I double checked my function_logical_id and they all seem ok, now I think I need to only provide one repo at the time? there should be way of being able to include all the repos for each deployment right?

@jorgesisco jorgesisco added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Jan 31, 2024
@mndeveci
Copy link
Contributor

mndeveci commented Feb 2, 2024

Can you provide which SAM CLI version you are using? Also, can you run same command with --debug flag and provide the output?

I've tried to re-produce locally but it didn't fail during argument parsing step.

@mndeveci mndeveci added blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Feb 2, 2024
@jorgesisco
Copy link
Author

Can you provide which SAM CLI version you are using? Also, can you run same command with --debug flag and provide the output?

I've tried to re-produce locally but it didn't fail during argument parsing step.

Hey! I am using SAM CLI, version 1.103.0

I managed to solve it by adding the values into the samconfig.toml with the following format:

parameter_overrides = "LambdaImageUri1=ECR_URL_1 LambdaImageUri2=ECR_URL_2 LambdaImageUri3=ECR_URL_3"

image_repositories = ["function_logical_id_1=ECR_URI_1", "function_logical_id_2=ECR_URI_2", "function_logical_id_3=ECR_URI_3"]

I would assume the format would also work if I were to provide them in the command as shown in my question, but since I am adding that to the samconfig.toml, I can just do sam deploy and I get no changes so far, since I have no recent changes in ECR and no changes in the template.

Copy link
Contributor

github-actions bot commented Feb 2, 2024

⚠️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
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale.
Projects
None yet
Development

No branches or pull requests

2 participants