CloudFormation Stack creation failure due to DelayLambda "The runtime parameter of python3.7 is no longer supported..."

0

Is it possible to fix this so CloudFormation Stack creation completes successfully.

"The runtime parameter of python3.7 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (python3.12) while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: a482cb7a-a321-4560-b60b-0ddea25ed91f)" (RequestToken: 89bae452-30d2-86a6-7d6b-931422d6267f, HandlerErrorCode: InvalidRequest)

Dom
질문됨 3달 전626회 조회
2개 답변
1

To resolve the error, you need to update the Lambda function runtime in your CloudFormation template to python3.12.

When deploying Lambda functions using CloudFormation, change the Handler and Runtime properties under the Lambda function resource:

Resources:
  Function:
    Type: AWS::Lambda::Function
    Properties: 
      Handler: index.handler
      Runtime: python3.12

Then, update your CloudFormation stack with the modified template. This will ensure the Lambda function is created or updated with the supported python3.12 runtime.

You may also need to update any other resources like S3 buckets or triggers that reference the Lambda function.

Refer to the AWS documentation for details on updating CloudFormation stacks and the latest supported runtimes for Lambda functions. Updating the template with the current runtime should allow the stack deployment to complete successfully.

profile picture
전문가
답변함 3달 전
0

I had the same issue on one of the first steps of the SageMaker tutorial: https://aws.amazon.com/tutorials/machine-learning-tutorial-label-training-data/

The above answer worked, but specifically, the directions for editing the CloudFormation template are here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-get-template.html.

In CloudFormation, in the stack, I clicked on the Template tab, then "View in Application Composer". It doesn't seem to work there, so I clicked "Go to Designer" at the top. On the screen that appears, at the bottom will be the text template. Press Ctrl+F, then search for all instances of "3.7" and replace it with "3.12". Then at the top, click the little file button, then Save, and choose Local File.

Now that the template is on your computer, go back to CloudFormation console on the Stacks page. Click Create Stack > With new resources. Select "Upload a template file", browse for the file you made and downloaded, then press Next. Enter a Stack name and press Next. Then press Next again. And finally, click the checkbox, and then Submit to create the stack.

Modarn
답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠