

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: CloudFront CDN
incomplete
2: CloudFront Distributions
incomplete
3: CloudFront Invalidation
incomplete
4: Presigned URLs
incomplete
5: Why Use Presigned URLs?
incomplete
6: CloudFront With DNS
incomplete
7: Cleanup
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Serving files is nice, but we often want CDN speed while still limiting access to specific users. To do that, we can use presigned URLs.
Presigned URLs are temporary, time-limited URLs that grant access to private S3 objects or CloudFront content. They're like tickets that expire:
Here's what a presigned URL looks like:
https://YOUR_BUCKET_NAME.s3.amazonaws.com/favicon.ico?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Date=20240101T120000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=...
That long query string contains the cryptographic signature and expiration time. Without it, the cloudfront servers will reject the request.
Presigned URLs are powerful, but remember: anyone with the URL can access the content until it expires! Don't share these links publicly if you want to keep content private. Once someone has the URL, they can use it until it expires.
Create a presigned URL for your favicon using the AWS CLI.
Cost check: Presigned URLs don't add any additional cost. You're still paying for S3 storage and CloudFront data transfer, but the URL generation itself is free. The security benefit is worth it.
aws s3 presign s3://YOUR_BUCKET_NAME/favicon.ico --expires-in 15
Paste the presigned URL that you generated into the text input and submit it.