awslabs / route53-dynamic-dns-with-lambda

A Dynamic DNS system built with API Gateway, Lambda & Route 53.
Apache License 2.0
486 stars 167 forks source link

Error with Lambda Runtime PYTHON_3.11 #50

Closed nhaskel closed 9 months ago

nhaskel commented 9 months ago

After cloning the repo to a cloud9 instance I ran cdk bootstrap which worked as expected. I then tried cdk deploy and received the following error: "[Error at /DyndnsStack/dyndns_fn/Resource] AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions.

Found errors"

It seems that they just released 3.12 in December. If I update dyndnsstack.py and add: runtime=lambda.Runtime.PYTHON_3_12 instead of PYTHON_3_11 then the deploy works.

bmcdonough commented 9 months ago
username:~/environment/route53-dynamic-dns-with-lambda (master) $ cdk deploy
[Warning at /DyndnsStack/dyndns_db/Resource] AwsSolutions-DDB3: The DynamoDB table does not have Point-in-time Recovery enabled. DynamoDB continuous backups represent an additional layer of insurance against accidental loss of data on top of on-demand backups. The DynamoDB service can back up the data with per-second granularity and restore it to any single second from the time PITR was enabled up to the prior 35 days.

[Error at /DyndnsStack/dyndns_fn/Resource] AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions.

Found errors

username:~/environment/route53-dynamic-dns-with-lambda (master) $ sed -i 's/PYTHON_3_11/PYTHON_3_12/g' ./dyndns/dyndns_stack.py

masberta commented 9 months ago

Thanks both and thanks to @JGamboa for PR: https://github.com/awslabs/route53-dynamic-dns-with-lambda/pull/49 addressing both issues, closing.