Designing A Timebound Download URL
Runcy Oommen | 23-Mar-2024
| Our Time-bound Agenda |
• Design characteristics and use-cases
• High level architecture overview
• Step-by-step walkthrough of steps (AWS services)
• Q&A, Discussions
Software Engineering Leader with 2
decades of industry exp; primarily in
systems, cloud, security, networking
Special interest in serverless, containers
and cloud-native offerings. Firm believer
of a multi-hybrid cloud future
Career
Community
Organizer of GDG Cloud and Cloud Native
meetup groups in Bangalore
Former co-organizer of AWS UG Bangalore
Multiple hackathon wins in cloud/security topics
Recognized by Google as a community influencer
runcyoommen
https://runcy.me
A design characteristic to access the
resource ONLY for a specified duration
Some common use-cases:
1. A content creator previewing a work before final signoff
2. Payment request URL for e-commerce transaction
3. Temp resource sharing b/w two external systems without
fear of interception
Easter egg: "Spot the stopwatch"
A
R
C
H
I
T
E
C
T
U
R
E
LET'S BEGIN
S3 Bucket Configuration
Central place for object storage
General bucket config
Block all the public access
Leave rest of config as defaults
IAM specific role creation
Policies for the serverless function
Choose entity and use case
Provide the required policies...
Saving the role...
Key creation and Secrets Manager
Generate publicprivate key pair
•openssl genrsa -out private_key.pem 2048
•openssl rsa -pubout -in private_key.pem -out public_key.pem
Add private key to Secrets Manager
Update private key as secret plain text
AWS Lambda Deployment
Serverless functionality
Lambda creation time...
Upload code as zip format
https://github.com/roommen/time-bound-url
Code compilation
Set appropriate environment variables
API Gateway Setup
Entry point of URL generation
Let's begin the API
Create a new resource
Create a new method
Select appropriate Lambda function name
Add appropriate permission
Appropriate URL query string parameters
Appropriate mapping templates Appropriate header mapping
Summary screen
Enable CORS
OPTIONS method enabled
Deploy the API New deployment stage
Completion of deployment
Create custom domain (optional)
Set endpoint config type
Configure API mapping
CloudFront Configuration
Distribute it via CDN
Paste public key created earlier Create key group
Create the distribution
Set the cache behavior
YAYY!!!
runcyoommen
https://runcy.me

Designing A Time bound resource download URL

Editor's Notes