ryansb / cfn-wrapper-python

Python decorator for making Lambda-backed CloudFormation resources
MIT License
71 stars 13 forks source link

cfn-response DeprecationWarning on lambdas created using CF #7

Open barkhasjsu opened 3 years ago

barkhasjsu commented 3 years ago

We are using cfn_resource create, update handlers for our lambdas in CF stacks. Since last week, we are getting DeprecationWarning and seeing connection timeout in logs as lambda is taking more than an hour to stabilize. Is it because the cfn_resource is using urllib2 or older? whereas the updated library cfnresponse uses urllib3 and AWS is suggesting to update requests libraries to urllib3. Our code doesn't use cfn-response library which is deprecating in April 2021. We have lambdas as Custom resource in CF stored in s3 buckets and defined custom cfn response functions to send responses. Also, this issue is intermittent. Anything we should update in our code if we are using cfn_resource?

ryansb commented 3 years ago

This should only be an issue if you still have Python 2 as your runtime, if possible upgrade to Python 3 so that it uses the standard urllib.request instead of Python 2's urllib2.