-
Notifications
You must be signed in to change notification settings - Fork 925
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
New pattern: Upload files to S3 bucket using presigned URLs (terraform) #2475
base: main
Are you sure you want to change the base?
New pattern: Upload files to S3 bucket using presigned URLs (terraform) #2475
Conversation
@@ -0,0 +1,107 @@ | |||
# Upload file up to 5GB to Amazon S3 bucket using presigned URL using Terraform |
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.
I understand the intention but I suggest moving the 5 GB limitation to the paragraph below instead of the title
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.
Got it. I have moved the 5GB limitation to the paragraph below!
|
||
## How it works | ||
|
||
This Terraform project uses allows user to upload a file up to 5 GB size using Amazon S3 bucket pre-sienged URL. Please refer to the architecture diagram below: |
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.
This Terraform project uses allows user to upload a file up to 5 GB size using Amazon S3 bucket pre-sienged URL. Please refer to the architecture diagram below: | |
This Terraform project uses allows user to upload a file up to 5 GB size using Amazon S3 bucket presigned URL. Please refer to the architecture diagram below: |
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.
Changed all pre-seigned wordings to presigned
"name": "Jing Xiang Peh", | ||
"image": "images/profile-pic.jpg", | ||
"bio": "I am a specialist solutions architect, Serveless based in Singapore", | ||
"linkedin": "https://www.linkedin.com/in/jing-xiang-peh/" |
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.
"linkedin": "https://www.linkedin.com/in/jing-xiang-peh/" | |
"linkedin": "jing-xiang-peh" |
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.
Changed as well
{ | ||
"name": "Jing Xiang Peh", | ||
"image": "images/profile-pic.jpg", | ||
"bio": "I am a specialist solutions architect, Serveless based in Singapore", |
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.
"bio": "I am a specialist solutions architect, Serveless based in Singapore", | |
"bio": "I am a Specialist Solutions Architect for Serveless based in Singapore", |
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.
Changed as well
"text": [ | ||
"Amazon API Gateway receives the HTTP POST request containing the file name to be uploaded", | ||
"AWS Lambda is triggered by the API Gateway, this java based function generates Amazon S3 presigned URL.", | ||
"A Java program is used to upload a file to the Amazon S3 bucket using the pre-signed URL" |
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.
"A Java program is used to upload a file to the Amazon S3 bucket using the pre-signed URL" | |
"A Java program is used to upload a file to the Amazon S3 bucket using the presigned URL" |
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.
Changed as well
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-lambda-java-events</artifactId> | ||
<version>3.11.3</version> |
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.
See above
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.
updated to latest version
<dependency> | ||
<groupId>software.amazon.awssdk</groupId> | ||
<artifactId>aws-core</artifactId> | ||
<version>2.21.19</version> |
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.
this should not be necessary with the bom import above
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.
removed
<dependency> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
<version>20231013</version> |
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.
see above
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.
updated to latest version
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.8.1</version> |
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.
see above
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.
updated to latest version
</plugin> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>3.3.0</version> |
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.
see above
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.
updated to latest version
Hello Ben, I have make the required changes and commit to the PR. Please review it and let me know if it's alright! Thank u! |
Looks good, thank you for your contribution. Your pattern will be merged to Serverlessland.com soon |
Issue #, if available:
Description of changes:
This sample project deploys an Amazon API Gateway REST API with an AWS Lambda integration. The Lambda function, written in Java, generates a presigned URL with write access to an Amazon S3 Bucket. The provided test class uploads a file into the S3 bucket using the presigned URL.
This project is implemented using Terraform and references the below pattern which is implemented using AWS SAM:
https://github.com/aws-samples/serverless-patterns/tree/main/apigw-lambda-s3-sam-java
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.