aws-samples / aws-lambda-ddns-function

Dynamically create Route 53 resource records using CloudWatch Events and Lambda
Apache License 2.0
236 stars 116 forks source link

Python Code error #35

Open iankittomar opened 5 years ago

iankittomar commented 5 years ago

I have followed your steps found a couple of problems.

1.) while running this command aws lambda create-function --function-name ddns_lambda --runtime python2.7 --role <enter-your-role-arn-here> --handler union.lambda_handler --timeout 30 --zip-file fileb://<LOCAL PATH>/union.py.zip there is no union.py.zip file 2.) python code error, Please reffer screenshort

2019-07-10 12_33_09-Window

vikten22 commented 5 years ago

@iankittomar The lambda function union.py will get required values from the event.

For example: when you launch an instance the event will be triggered for running instance state and executes lambda function for those instance details. Or you can pass event data manually and run the function.

When you run this lambda without values, you will get into this error.