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
