I am trying to deploy to Lambda using `aws-sam-deploy` pipe and got an "Missing option '--image-repository' or '--image-repositories'" error when packaging. However, I have included "image_repositories" inside my `samconfig.toml` file and set SAM_CONFIG to `samconfig.toml` file.
I can build and deploy to AWS Lambda using Docker images from local without any problems with the command `sam build` and then `sam deploy`. So I do not think there's anything wrong with my `template.yaml` or `samconfig.toml`
What steps am I missing? Any help would be greatly appreciated.
bitbucket-pipeline error message:
INFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
INFO: Start package...
SAM CLI now collects telemetry to better understand customer needs.
You can OPT OUT and disable telemetry collection by setting the
environment variable SAM_CLI_TELEMETRY=0 in your shell.
Thanks for your help!
Learn More: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-telemetry.html
Usage: sam package [OPTIONS]
Try 'sam package -h' for help.
Error: Missing option '--image-repository' or '--image-repositories'
✖ Failed SAM package.
Relevant part of my pipeline (monorepo, so I have to cd into the specific directory where `samconfg.toml` and `template.yaml` resides:
- apt-get update
- cd project/function
- pipe: atlassian/aws-sam-deploy:1.2.0
And here's my samconfig.toml:
version = 0.1
stack_name = "MyLambdaFunction"
s3_bucket = "lambda-function-bucket"
s3_prefix = "s3-prefix/"
region = "us-east-1"
capabilities = "CAPABILITY_IAM"
image_repositories = ["MyLambdaFunction=12345678910.dkr.ecr.us-east-1.amazonaws.com/my-lambda-function"]
confirm_changeset = false
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events