Lambda Botocore Deprecation - April 01, 2021

Does this upcoming AWS change affect users of your CloudFormation templates? Probably we all received this email. Maybe you could explain, thanks.

Potential Action Required: Lambda Botocore Deprecation

We are contacting you regarding actions needed on your account(s) to prevent disruption to your CloudFormation stacks. Starting on April 01, 2021, AWS Lambda will no longer support the botocore.requests library in Python runtimes [1][2]. If you are using the cfn-response module for a Lambda-backed custom resource, you must modify your Lambda function resource’s Code or Runtime property and update your stack(s) in order to get the latest version of the cfn-response module which removed its dependency on botocore.requests. If you do not update your Lambda function by April 01, 2021, you will no longer be able to create, update or delete your custom resource. If you are updating the Runtime property, please include the lambda:UpdateFunctionCode action in your IAM policy.

If you are hosting your Lambda function code from an S3 bucket, you can refer to the updated cfn-response module’s source code in our documentation [3]. For more information on how to update lambda function can be found in knowledge center [4].

Hi Jim,

that’s a good question. I haven’t received this email from AWS yet so we have to investigate this.

One the one hand, all our Lambda functions are Node.js based so we shouldn’t be affected by this python runtime change.
On the other hand, we use the cfn-response Node.js module and I’m not entirely sure if that is the same thing that is mentioned in the email.

Could you copy the links from the bottom of the AWS email to provide me the links for [1], [2], [3], [4] to have a closer look?


Sure, Michael, thank you.


Thanks for the details. The last link says

I want to update the AWS CloudFormation cfn-response module for AWS Lambda functions running on Python 2.7/3.6/3.7.

In summary, our CloudFormation templates/modules are not affected. We don’t use the python runtime for Lambda :sweat_smile:

Thank you, Michael. Won’t worry about it, then.

1 Like

The notification is to referring to Lambda functions similar to below

Type: AWS::Lambda::Function
    Handler: index.lambda_handler
    Runtime: python3.6
    Timeout: 30
    Role: !GetAtt LambdaExecutionRole.Arn
    ZipFile: !Sub |
        import json
        import cfnresponse
        def lambda_handler(event, context):
            print("Received event: " + json.dumps(event, indent=2))
            cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.