-
Notifications
You must be signed in to change notification settings - Fork 1k
kinesis-lambda-terraform: Update runtime to nodejs22.x #2834
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?
kinesis-lambda-terraform: Update runtime to nodejs22.x #2834
Conversation
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 4.22" | ||
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 Node.js 22 runtime. So I updated the version to v5.
} | ||
|
||
resource "aws_lambda_function" "sample_lambda" { | ||
filename = "sample_lambda.zip" # Path to your Lambda code ZIP file |
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 error occurred.
╷
│ Error: reading ZIP file (sample_lambda.zip): open sample_lambda.zip: no such file or directory
│
│ with aws_lambda_function.sample_lambda,
│ on main.tf line 20, in resource "aws_lambda_function" "sample_lambda":
│ 20: resource "aws_lambda_function" "sample_lambda" {
│
╵
] | ||
} | ||
) | ||
} |
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 error occurred.
╷
│ Error: creating Lambda Event Source Mapping (arn:aws:kinesis:us-east-1:000000000000:stream/sample-stream): operation error Lambda: CreateEventSourceMapping, https response error StatusCode: 400, RequestID: 8dc4328e-eea3-4e1e-b3e5-601eca619082, InvalidParameterValueException: Cannot access stream arn:aws:kinesis:us-east-1:000000000000:stream/sample-stream. Please ensure the role can perform the GetRecords, GetShardIterator, DescribeStream, DescribeStreamSummary, ListShards, and ListStreams Actions on your stream.
│
│ with aws_lambda_event_source_mapping.sample_mapping,
│ on main.tf line 51, in resource "aws_lambda_event_source_mapping" "sample_mapping":
│ 51: resource "aws_lambda_event_source_mapping" "sample_mapping" {
│
╵
@@ -1,6 +1,6 @@ | |||
# AWS Kinesis Data Streams to AWS Lambda | |||
# Amazon Kinesis Data Streams to AWS Lambda |
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: Fix to correct service name.
Issue #, if available:
N/A
Description of changes:
Hi😀 Thanks for the useful patterns!
To prevent future deployment issues, I updated the Lambda Node.js runtime version to
nodejs22.x
.While testing
kinesis-lambda-terraform
, I noticed that the Lambda runtime versionnodejs16.x
was deprecated.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.