lalithkumar
lalithkumar

Reputation: 3530

Not able to create a lambda function through AWS command

I am trying to create a lambda function through the AWS command.When I'm executing the below command Its gives me the Unknown option error.

AWS Command:

aws lambda create-function --function-name function_name ukmon-appd-disabled- 
health-rules --runtime python3.7 --zip-file 
fileb://bin/disabled_health_rules.zip --handler index.handler --timeout 10 - 
-memory-size 1024 --role arn:aws:iam::99999999999:role/crossaccount

Error:

Unknown options: ukmon-appd-disabled-health-rules

I've tried with different names.I am not able to understand what does that error mean. Thanks in advance.

Upvotes: 0

Views: 303

Answers (2)

Sébastien Stormacq
Sébastien Stormacq

Reputation: 14905

You have the argument function-name written twice. Just remove one like this

aws lambda create-function --function-name ukmon-appd-disabled- 
health-rules --runtime python3.7 --zip-file 
fileb://bin/disabled_health_rules.zip --handler index.handler --timeout 10 - 
-memory-size 1024 --role arn:aws:iam::99999999999:role/crossaccount

Upvotes: 2

Milan Cermak
Milan Cermak

Reputation: 8064

Remove the function_name. It is being recognized as the value to the parameter --function-name instead of the ukmon-appd-disabled-health-rules.

Upvotes: 3

Related Questions