Amazon S3 Origin based routing using Lambda@Edge and CloudFront Distribution

  Рет қаралды 8,887

Vibhor Gupta - Product | Project | Technology

Vibhor Gupta - Product | Project | Technology

Күн бұрын

Deploy Lambda@Edge function that will route traffic to S3 bucket based on the viewer’s country. CloudFront adds the CloudFront-Viewer-Country header when the request is received from any user. The trigger can be used to change the Amazon S3 origin from which we get the content via Lambda@Edge function.
Timestamps
00:00 Introduction
00:35 Architecture of S3 origin based routing
01:53 Benefit of using S3 origin based routing
02:13 Create Amazon S3 buckets in different regions
03:26 Create CloudFront distribution
04:30 Upload content in Amazon S3 and enable static website hosting
06:07 Verify static websites across all regions
07:43 Create a Lambda@Edge function for country-viewer-request
09:12 Lambda@Edge example functions in AWS documentation
10:45 Add origin-request CloudFront trigger
11:22 Edit cache behavior and whitelist country-viewer-request
12:23 Simulate as users from different countries
Link to resources:
Lambda@Edge example functions
docs.aws.amazon.com/AmazonClo...
S3 example bucket policies
docs.aws.amazon.com/AmazonS3/...

Пікірлер: 19
@JoseSotoCanHelp
@JoseSotoCanHelp 2 жыл бұрын
Thank you for the great information.
@rohanrasal7096
@rohanrasal7096 3 жыл бұрын
Thank You
@vibhor-gupta
@vibhor-gupta 3 жыл бұрын
You are welcome Rohan
@codewithsub5083
@codewithsub5083 8 ай бұрын
Very nicely explained. Which Vpn tool are you using?
@anshumaagrawal2574
@anshumaagrawal2574 3 жыл бұрын
Great effort
@vibhor-gupta
@vibhor-gupta 3 жыл бұрын
Thanks a lot
@rajanikanthreddyk4940
@rajanikanthreddyk4940 Жыл бұрын
Can you send the index.html content here please
@AnkitKumar-ey1fb
@AnkitKumar-ey1fb 2 жыл бұрын
Cool !! Can we setup same for API Gateway instead of S3 Bucket, like if i need to serve Region-specific lambda connected to API Gateway to the user requesting with specific request body. Basically, There are situations where user from UK region is remotely working from US and user data is isolated to respective regions and though he is accessing with US IP Address. So according to your model it is obvious that he will get data from US region only. Can we modify host uri with request body/headers content which will get validating data from Global Data Center like a small validation inside Lambda@Edge. Thanks!!
@103spartan
@103spartan 2 жыл бұрын
If I have secured my s3 endpoint urls using some random string using awsreferer condition and I’m able to add the same header details on cloud front settings and it works but How would I be able to pass it across lamba@edge function?
@ilthizamimtiyas3482
@ilthizamimtiyas3482 3 жыл бұрын
In this architecture if you bring a one change to the website, which means we have to do the update for all the other bucker as well. Is there any way of having a one bucket and load data dynamically based on the domain name?
@vibhor-gupta
@vibhor-gupta 3 жыл бұрын
You could use Cross Region Replication
@suryamouli24
@suryamouli24 2 жыл бұрын
Nice one can you make a video by using edgelambda to get access object in S3 bucket through cloudfront domain with cognito authentication
@RahulAhire
@RahulAhire 3 жыл бұрын
Can this method be also used to properly utilise DynamoDB global tables? For me without lambda@edge global tables seems useless.
@vibhor-gupta
@vibhor-gupta 2 жыл бұрын
DynamoDB and S3 are different services. This is only for S3.
@user-kx1hh5ng9g
@user-kx1hh5ng9g Жыл бұрын
can this apply to s3 buckets that are private?
@arnabbidishavlogs
@arnabbidishavlogs 2 жыл бұрын
Can you please share this index.html file
@MrCrYMusic
@MrCrYMusic 3 жыл бұрын
Weird I don't have access to cloud front blueprint
@vibhor-gupta
@vibhor-gupta 3 жыл бұрын
Could you please elaborate
@miguelmunguia1428
@miguelmunguia1428 2 жыл бұрын
Thank you for the great information. Can you please share this index.html file?
Access Amazon S3 bucket via SFTP using AWS Transfer Family | Transfer files to S3 bucket using SFTP
17:55
Vibhor Gupta - Product | Project | Technology
Рет қаралды 11 М.
Enable Versioning, Lifecycle Rule, and Replication on Amazon S3 bucket
20:43
Vibhor Gupta - Product | Project | Technology
Рет қаралды 2,9 М.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
Каха заблудился в горах
00:57
К-Media
Рет қаралды 9 МЛН
Amazon CloudFront with Lambda@Edge
10:02
Jayendra's Vlog
Рет қаралды 3,1 М.
AWS Organization 101
23:19
Vibhor Gupta - Product | Project | Technology
Рет қаралды 10 М.
Serving Multiple Websites with AWS CloudFront & Lambda at Edge
28:32
Enlear Academy
Рет қаралды 14 М.
High availability with Amazon S3 bucket region failover via CloudFront origin
18:10
Vibhor Gupta - Product | Project | Technology
Рет қаралды 2,5 М.
Host a static website on AWS S3 using Cloud Front Distribution and Route53
19:06
Vibhor Gupta - Product | Project | Technology
Рет қаралды 15 М.
How to configure Cloudfront Presign URLs
13:43
Ivan Carcamo
Рет қаралды 6 М.
CloudFront Signed URLs with Node.js
12:42
Sam Meech-Ward
Рет қаралды 22 М.
DNS & Amazon Route 53 Deep dive
53:08
EICIT Learning
Рет қаралды 13 М.
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 65 МЛН
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 12 МЛН
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 3,3 МЛН
Хакер взломал компьютер с USB кабеля. Кевин Митник.
0:58
Последний Оплот Безопасности
Рет қаралды 2,2 МЛН
Это - iPhone 16!
16:29
Rozetked
Рет қаралды 138 М.