-
Notifications
You must be signed in to change notification settings - Fork 1k
lambda-efs-cdk: Update aws-cdk-lib #3248
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
Open
kakakakakku
wants to merge
4
commits into
aws-samples:main
Choose a base branch
from
kakakakakku:lambda-efs-cdk
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Amazon API Gateway to Lambda to Amazon EFS | ||
| # Amazon API Gateway to AWS Lambda to Amazon EFS | ||
|
|
||
| This pattern attaches an EFS file system to your Lambda function to give it expandable, persistent storage. Having this level of storage in a Lambda function opens the door to many new possibilities (multiple functions can even use the same file system) | ||
|
|
||
|
|
@@ -43,10 +43,8 @@ Important: this application uses various AWS services and there are costs associ | |
| ```bash | ||
| cdk deploy | ||
| ``` | ||
| 1. Cleanup | ||
|
|
||
| 1. Note the outputs from the CDK deployment process. These contain the resource names and/or ARNs which are used for testing. | ||
|
|
||
| Note the outputs from the CDK deployment process. These contain the resource names and/or ARNs which are used for testing. | ||
|
|
||
| ## How it works | ||
|
|
||
|
|
@@ -66,8 +64,13 @@ The Lambda Function will behave differently based on the RESTful verb you use: | |
| The URL for the HTTP API to use these commands will be printed in the CloudFormation stack output after you deploy. | ||
| Postman can be used to read/write text using API URL printed in output of the cdk deploy command. | ||
|
|
||
| Note - After deployment you may need to wait 60-90 seconds before the implementation works as expected. There are a lot of network configurations happening so you need to wait on propagation | ||
| ```bash | ||
| curl -X POST -H 'Content-Type: text/plain' -d 'Hello!' ${APIUrl} | ||
| curl ${APIUrl} | ||
| curl -X DELETE ${APIUrl} | ||
| ``` | ||
|
|
||
| Note - After deployment you may need to wait 60-90 seconds before the implementation works as expected. There are a lot of network configurations happening so you need to wait on propagation | ||
|
|
||
| ## Useful commands | ||
|
|
||
|
|
@@ -77,12 +80,18 @@ Note - After deployment you may need to wait 60-90 seconds before the implementa | |
| * `cdk diff` compare deployed stack with current state | ||
| * `cdk docs` open CDK documentation | ||
|
|
||
| ## Cleanup | ||
|
|
||
| 1. Run the given command to delete the resources that were created. | ||
| ```bash | ||
| cdk destroy | ||
| ``` | ||
|
|
||
| ## Useful References | ||
| [Using Amazon EFS with Lambda] (https://docs.aws.amazon.com/lambda/latest/dg/services-efs.html) | ||
| [[Configuring file system access for Lambda functions] https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html | ||
| Using Amazon EFS for AWS Lambda in your serverless applications] (https://aws.amazon.com/blogs/compute/[using-amazon-efs-for-aws-lambda-in-your-serverless-applications/ | ||
| Danilo Poccia - A Shared File System for Your Lambda Functions] https://aws.amazon.com/blogs/aws/new-a-shared-file-system-for-your-lambda-functions/) | ||
| - [Using Amazon EFS with Lambda](https://docs.aws.amazon.com/lambda/latest/dg/services-efs.html) | ||
| - [Configuring file system access for Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html) | ||
| - [Using Amazon EFS for AWS Lambda in your serverless applications](https://aws.amazon.com/blogs/compute/using-amazon-efs-for-aws-lambda-in-your-serverless-applications/) | ||
| - [Danilo Poccia - A Shared File System for Your Lambda Functions](https://aws.amazon.com/blogs/aws/new-a-shared-file-system-for-your-lambda-functions/) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: Fix broken markdown links. |
||
|
|
||
| ---- | ||
| Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,2 @@ | ||
| aws-cdk-lib==2.13.0 | ||
| aws-cdk-lib==2.260.0 | ||
| constructs>=10.0.0,<11.0.0 | ||
| aws-cdk.aws-apigatewayv2-alpha | ||
| aws-cdk.aws-apigatewayv2-integrations-alpha | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: The apigatewayv2-alpha modules are deprecated because they graduated to stable and are now part of aws-cdk-lib. |
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Add testing commands.