Skip to content

Conversation

kakakakakku
Copy link
Contributor

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 version nodejs16.x was deprecated.
https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

Check

terraform apply completed successfully and works good.

image

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.

aws = {
source = "hashicorp/aws"
version = "~> 4.22"
version = "~> 5.0"
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: 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
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: 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" {
│ 
╵

]
}
)
}
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: 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
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: Fix to correct service name.

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