Skip to content

terraform-lambda-sfn: Update runtime and Powertools to python3.12 #2786

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion terraform-lambda-sfn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The pattern creates a Lambda function, and a Step Functions workflow, a Log group and the IAM resources required to run the application.

A Lambda function uses the AWS SDK to asyncronously invoke the Step Function workflow, passing the event body. The Step Function workflow showcasing the different States.
A Lambda function uses the AWS SDK to asynchronously invoke the Step Function workflow, passing the event body. The Step Function workflow showcasing the different States.

![](./images/stepfunctions_graph.png)

Expand Down
2 changes: 1 addition & 1 deletion terraform-lambda-sfn/example-pattern.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"headline": "How it works",
"text": [
"The pattern creates a Lambda function, and a Step Functions workflow, a Log group and the IAM resources required to run the application.",
"A Lambda function uses the AWS SDK to asyncronously invoke the Step Function workflow, passing the event body. The Step Function workflow showcasing the different States."
"A Lambda function uses the AWS SDK to asynchronously invoke the Step Function workflow, passing the event body. The Step Function workflow showcasing the different States."
]
},
"gitHub": {
Expand Down
4 changes: 2 additions & 2 deletions terraform-lambda-sfn/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ module "lambda_function" {
function_name = "${random_pet.this.id}-lambda"
description = "My awesome lambda function"
handler = "LambdaFunction.lambda_handler"
runtime = "python3.8"
runtime = "python3.12"
publish = true

source_path = "${path.module}/src"

layers = ["arn:aws:lambda:${data.aws_region.current.name}:017000801446:layer:AWSLambdaPowertoolsPython:15"]
layers = ["arn:aws:lambda:${data.aws_region.current.region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:19"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@kakakakakku kakakakakku Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region

name - (Optional, Deprecated) Full name of the region to select. Use region instead.

β•·
β”‚ Warning: Deprecated attribute
β”‚ 
β”‚   on main.tf line 107, in module "lambda_function":
β”‚  107:   layers = ["arn:aws:lambda:${data.aws_region.current.name}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86_64:19"]
β”‚ 
β”‚ The attribute "name" is deprecated. Refer to the provider documentation for details.
β”‚ 
β”‚ (and 5 more similar warnings elsewhere)
β•΅


environment_variables = {
SFN_ARN = module.step_function.state_machine_arn
Expand Down