0

I am trying to deploy an image to be run in aws lambda at a scheduled interval. I have built and tested the image using RIE and locally it runs as it should. Next I have pushed the image to aws ecr to be stored. My next step is to create a aws lambda function and this is where my troubles begin. As per the docs:

If the deployment package is a container image , then you set the package type to Image . For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties.

And when I try to create my lambda function which is:

aws lambda create-function --region <REGION> --function-name tft-image-test \ --package-type Image \ --code ImageUri=<ACCOUNT-ID>.dkr.ecr.<REGION>.amazonaws.com/<REPOSITORY-NAME>:test-image \ --role <VALID-ROLE> 

I get the following error:

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run: aws help aws <command> help aws <command> <subcommand> help aws: error: the following arguments are required: --runtime, --handler 

The exact properties that I was not needed to specify are throwing me an error.

This is my first time using aws services, any help towards resolving this issue is appreciated.

EDIT:

awscli version: 1.18.69

2
  • What CLI version are you using? Commented Mar 24, 2023 at 12:49
  • @palvarez I've updated the question Commented Mar 27, 2023 at 6:32

1 Answer 1

0

The usage of containers with Lambda was introduced in CLI version >=2.2.0. You need to update your CLI version in order to make it work.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.