Hubs-Foundation / hubs-cloud

Resources for self hosted Hubs Cloud instances
Mozilla Public License 2.0
151 stars 92 forks source link

Upgrade Python dependency for Lambdas by April 1st #183

Open robinkwilson opened 3 years ago

robinkwilson commented 3 years ago

Received this email from Amazon regarding Lambda.

Hello,

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].

Please contact AWS Support if you have any questions or concerns [5].

[1] https://aws.amazon.com/blogs/compute/upcoming-changes-to-the-python-sdk-in-aws-lambda/ [2] https://aws.amazon.com/blogs/developer/removing-the-vendored-version-of-requests-from-botocore/ [3] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-lambda-function-code-cfnresponsemodule.html [4] https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-cfn-response-lambda/ [5] https://aws.amazon.com/support/

┆Issue is synchronized with this Jira Task

brianpeiris commented 3 years ago

Looks like we use botocore in four lambas:

jasoncks commented 3 years ago

May I know if this issue is solved? Since 1st April is coming soon...

camelgod commented 2 years ago

Was this resolved in time?

CptPlastic commented 2 years ago

Can we update this ourself?

Resource handler returned message: "The runtime parameter of python2.7 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (python3.9) while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: 2d5402b0-600b-4100-ba1e-777502814d5f, Extended Request ID: null)" (RequestToken: 508e6b50-4be1-ffe8-edd2-cfef74cf635f, HandlerErrorCode: InvalidRequest)

beingalitaheri commented 2 years ago

This is late October and I just tried to create a new stack for Mozilla Hub Cloud in AWS and I got the same error!

Is there any solution for this?

kaelnguyen commented 2 years ago

fixed here: https://github.com/mozilla/hubs/issues/4766#issuecomment-953468112