Skip to content

Conversation

@kakakakakku
Copy link
Contributor

Issue #, if available:
N/A

Description of changes:
Hi😀 Thanks for the useful patterns!

This commit forces the Lambda Python runtime to 3.14, but it seems the update was made without verifying that it actually works.

As a result, I get the following error:

╷
│ Error: expected runtime to be one of [nodejs nodejs4.3 nodejs6.10 nodejs8.10 nodejs10.x nodejs12.x nodejs14.x nodejs16.x java8 java8.al2 java11 python2.7 python3.6 python3.7 python3.8 python3.9 dotnetcore1.0 dotnetcore2.0 dotnetcore2.1 dotnetcore3.1 dotnet6 nodejs4.3-edge go1.x ruby2.5 ruby2.7 provided provided.al2 nodejs18.x], got python3.14
│ 
│   with aws_lambda_function.MyLambdaFunction,
│   on main.tf line 185, in resource "aws_lambda_function" "MyLambdaFunction":
│  185:   runtime          = "python3.14"
│ 
╵

So I fixed it.

Check

$ curl --location --request POST 'https://flr7isxlm2.execute-api.us-east-1.amazonaws.com/' --header 'Content-Type: application/json' \
--data-raw '{
    "Detail":{
        "message": "Hello From API Gateway"
    }
}'
{"Entries":[{"EventId":"a8a57abc-2f8d-7bcb-b0e7-d0ffb98b1d86"}],"FailedEntryCount":0}

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.

"events:PutEvents"
],
"Resource" : "arn:aws:events:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:event-bus/default"
"Resource" : "arn:aws:events:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:event-bus/default"
Copy link
Contributor Author

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 57, in resource "aws_iam_policy" "APIGWPolicy":
│   57:       "Resource" : "arn:aws:events:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:event-bus/default"
│ 
│ The attribute "name" is deprecated. Refer to the provider documentation for details.
│ 
│ (and 2 more similar warnings elsewhere)

aws = {
source = "hashicorp/aws"
version = "~> 3.27"
version = "~> 6"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: Update AWS Provider to v6 for Python 3.14😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants