-
Notifications
You must be signed in to change notification settings - Fork 996
apigw-lambda-dynamodb-terraform: Update runtime to python3.13 #2799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
apigw-lambda-dynamodb-terraform: Update runtime to python3.13 #2799
Conversation
@@ -2,7 +2,7 @@ terraform { | |||
required_providers { | |||
aws = { | |||
source = "hashicorp/aws" | |||
version = "~> 4.0.0" | |||
version = "~> 5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: Older version does not support Python 3.13 runtime. So I updated the version to v5.
block_public_acls = true | ||
block_public_policy = true | ||
ignore_public_acls = true | ||
restrict_public_buckets = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: The following error occurred when applying.
╷
│ Error: creating S3 Bucket (apigw-lambda-ddb20250719083122545300000001) ACL: operation error S3: PutBucketAcl, https response error StatusCode: 400, RequestID: RTCDVY9T5Y9NE0MW, HostID: vfd4QSf6vdz0D13xfdcM0lQDDIncDGdaEDF5Zsu1HhwOzmpYDt5r3C/0j1MKxlXp2QAnWBExjFw=, api error AccessControlListNotSupported: The bucket does not allow ACLs
│
│ with aws_s3_bucket_acl.private_bucket,
│ on main.tf line 58, in resource "aws_s3_bucket_acl" "private_bucket":
│ 58: resource "aws_s3_bucket_acl" "private_bucket" {
│
╵
This issue is related to the changes described in the following blog post. To fix this, I enabled Block Public Access for the S3 bucket😀
Disabling ACLs is an S3 security best practice, and in April of 2023, we disabled ACLs by default for all new buckets.
https://aws.amazon.com/jp/blogs/storage/disabling-acls-for-existing-amazon-s3-workloads-with-information-in-s3-server-access-logs-and-aws-cloudtrail/
ce423dc
to
3437871
Compare
Issue #, if available:
N/A
Description of changes:
Hi😀 Thanks for the useful patterns!
To prevent future deployment issues, I updated the Lambda Python runtime version to
python3.12
python3.13
.While testing
apigw-lambda-dynamodb-terraform
, I noticed that the Lambda runtime versionpython3.8
was deprecated. Although it's still deployable at the moment, it will not be allowed after October 1, 2025.https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
Check
terraform apply
completed successfully and works good.Thank you😀
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.