Skip to content
Merged
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
1 change: 1 addition & 0 deletions dynamodb-streams-lambda-terraform/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lambda.zip
2 changes: 1 addition & 1 deletion dynamodb-streams-lambda-terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ After deployment, add an item to the DynamoDB table. Go to the CloudWatch Logs f
```bash
terraform show
```
```

----
Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Expand Down
4 changes: 2 additions & 2 deletions dynamodb-streams-lambda-terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.27"
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.

}
}

Expand Down Expand Up @@ -40,7 +40,7 @@ resource "aws_lambda_function" "lambda_dynamodb_stream_handler" {
source_code_hash = data.archive_file.lambda_zip_file.output_base64sha256
handler = "index.handler"
role = aws_iam_role.iam_for_lambda.arn
runtime = "nodejs16.x"
runtime = "nodejs22.x"
}

data "archive_file" "lambda_zip_file" {
Expand Down
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: I renamed the file because it had the following error.

╷
│ Error: Archive creation error
│ 
│   with data.archive_file.lambda_zip_file,
│   on main.tf line 46, in data "archive_file" "lambda_zip_file":
│   46: data "archive_file" "lambda_zip_file" {
│ 
│ error creating archive: error archiving file: could not archive missing file: ./src/index.js
╵

File renamed without changes.