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 deprecated Lambda Node.js runtime nodejs16.x to nodejs22.x.
See https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

Check

sam deploy completed successfully and works good.

image image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment on lines +6 to +7
const { DynamoDBClient } = require('@aws-sdk/client-dynamodb');
const { DynamoDBDocumentClient, PutCommand } = require('@aws-sdk/lib-dynamodb');
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: Some error occurs. Because in Node.js 18 and later runtimes, AWS SDK v3 is bundled, so I rewrote it to v3. See articles below.

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.

./deploy_frontend.sh
zsh: permission denied: ./deploy_frontend.sh

ResourceArn: !Sub arn:aws:apigateway:${AWS::Region}::/restapis/${API}/stages/dev
WebACLArn: !GetAtt APIWebACL.Arn

DependsOn: APIdevStage
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.

CREATE_FAILED                                     AWS::WAFv2::WebACLAssociation                     APIWAFAssociation                                 Resource handler returned message: "AWS WAF
                                                                                                                                                      couldn?t perform the operation because your
                                                                                                                                                      resource doesn?t exist. (Service: Wafv2, Status
                                                                                                                                                      Code: 400, Request ID: 041ad0fb-
                                                                                                                                                      bad6-4a40-bce1-167f1218846f) (SDK Attempt
                                                                                                                                                      Count: 1)" (RequestToken:
                                                                                                                                                      acdc9901-b12e-7a14-f6c6-01eaa767eba3,
                                                                                                                                                      HandlerErrorCode: NotFound)

@@ -1,6 +1,6 @@
# Amazon Cloudfront distribution in front of Amazon S3 and an Amazon API Gateway REST API to AWS Lambda to Amazon DynamoDB
# Amazon CloudFront distribution in front of Amazon S3 and an Amazon API Gateway REST API to AWS Lambda to Amazon DynamoDB
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.

1. Create a new directory, navigate to that directory in a terminal and clone the GitHub repository:
```
git clone https://gitlab.aws.dev/jrdwyer/aws-serverless-webform-sample.git
git clone https://github.com/aws-samples/serverless-patterns
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 URL.

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