I just did the same thing on what you did. Why I keep on getting this error Test Event Name test123 Response { "errorMessage": "'DBInstanceName'", "errorType": "KeyError", "requestId": "e543672c-380b-4918-921e-a7371269b044", "stackTrace": [ " File \"/var/task/lambda_function.py\", line 13, in lambda_handler DBinstance = funcResponse['Environment']['Variables']['DBInstanceName'] " ] } Function Logs START RequestId: e543672c-380b-4918-921e-a7371269b044 Version: $LATEST Trying to get Environment variable [ERROR] KeyError: 'DBInstanceName' Traceback (most recent call last): File "/var/task/lambda_function.py", line 13, in lambda_handler DBinstance = funcResponse['Environment']['Variables']['DBInstanceName']END RequestId: e543672c-380b-4918-921e-a7371269b044 REPORT RequestId: e543672c-380b-4918-921e-a7371269b044 Duration: 343.89 ms Billed Duration: 344 ms Memory Size: 128 MB Max Memory Used: 70 MB Request ID e543672c-380b-4918-921e-a7371269b044