Published a YouTube video
Spoke about AWS
Published a podcast episode
Live Coding
+2

49. Building a File Transfer application on AWS - Live coding PART 2


How can you build a WeTransfer or a Dropbox Transfer clone on AWS?

This is our second live coding stream. In this episode, we revisited our architecture and added a custom domain to our APIs, and created a new API endpoint that allows us to have download URLs that are much nicer (shorter and branded).

We also added support for the Content-Disposition header to make sure that uploads can specify a file name and that downloads will retain the same file name (regardless of the file key in S3).

All our code is available in this repository: https://github.com/awsbites/weshare.click.

🔖 Chapters

00:00 Intro
02:16 Recap of the previous episode
03:12 Differences between AWS SDK for JavaScript v2 and v3
07:12 What are S3 pre-signed URLs
10:18 Updated architecture diagram (plan for today)
18:04 Setting up a custom domain on Route53
23:22 Creating a dedicated CloudFormation stack to handle DNS records and the certificate
30:13 Validating certificates using DNS records
34:03 Adding a custom domain to our serverless stack
38:48 Creating DNS records to point to our domain to API Gateway
43:05 Custom domain mapping for API Gateway
45:58 Looking at the generated CloudFormation code
48:20 Deploying and testing our API using the new custom domain
52:20 Adding the new Download Lambda function and endpoint specification
56:15 Updating the old upload code to use the custom domain
59:20 Writing our new Lambda for the file download
01:09:30 Review and deployment
01:17:40 Using Content-Disposition to retain the original filename
01:32:30 Debugging Presigned-URL issues
01:42:14 Wrapping up

We set ourselves up for a challenge and in this series of live streams we will try to incrementally build a simple clone of WeTransfer or Dropbox Transfer that would allow us to upload files and share them by URL.

Everything is up for discussion (and your opinion is important!) but right now we are expecting to be using S3, Lambda, API Gateway, Route53, and tons of Node.js!

Come and join us on this awesome project! 🤩

All the episodes of this series:

- 🗒 Full playlist: https://www.youtube.com/watch?v=EfRElTYilyY&list=PLAWXFhe0N1vI1_z-06EzJ22pz95_gBrId
- PART 1: https://youtu.be/EfRElTYilyY (MVP with Lambda, API Gateway, and S3)
- PART 2: https://youtu.be/4wCX32YUtMk (Custom domain with Route53 and Content-Disposition)
- PART 3: https://youtu.be/hlW_RwRgskI (Observability best practices with Middy and Lambda Power Tools + CLI Application)
- PART 4: https://youtu.be/vVic3oqqqfY (Adding authentication using Cognito and implementing the OAuth 2 device flow)
- PART 5: https://youtu.be/0TzfkbisMEA (OAuth 2 device flow and DynamoDB Single Table Design)
- PART 6: https://youtu.be/b-FoqIcOcPw (Completing OAuth 2 device flow and Adding a login command to the CLI application)

#AWS #Route53 #Serverless