Deploy React App to CloudFront with HTTPS Custom Domain

  Рет қаралды 14,520

Sam Meech-Ward

Sam Meech-Ward

Күн бұрын

Learn how to deploy a react app, or any static website, to a Cloud Front distribution custom domain name and SSL Certificate.
Chapters:
0:00​ Intro
0:59 Building the react app
1:35 Create an S3 bucket
2:37 Create CloudFront Distribution
4:16 Custom Domain Name
5:19 SSL Certificate
7:08 DNS Record in Route 53
8:26 Custom Error Page for React
10:46 Updating the Website
12:05 CloudFront Invalidate Files
13:06 AWS CLI
aws s3 sync directory-path "s3://your-bucket-name/"
aws cloudfront create-invalidation --distribution-id your-distribution-id --paths '/*'
🔗Route 53 Domain Name
• AWS Route 53 Domain Name
🔗 AWS CLI
• Setting Up The AWS CLI
🔗S3 Static Website AWS CLI
sammeechward.com/aws-cli-s3-s...
🔗Moar Links
My Website: www.sammeechward.com
Instagram: / meech_ward
Github: github.com/orgs/Sam-Meech-Ward

Пікірлер: 48
@PurelyDef
@PurelyDef Жыл бұрын
Thank you for this video. For anyone following along, as of 3/24/23 they've replaced "Origin Access Identity" with "Origin access control settings (recommended)". The steps are roughly the same, but you have to copy the bucket policy, then go into your s3 bucket and paste it in yourself, because of course aws can't just leave things the way they are for longer than a few months
@brunoaustin9756
@brunoaustin9756 Жыл бұрын
do i really need an ssl certificate? because its taking too long to be issued. plus i want the url to be custom
@mikefdorst
@mikefdorst 10 ай бұрын
@@brunoaustin9756 If you don't have an SSL certificate, when people go to your website it will notify them that it's not secure. So it's nice to have it. It shouldn't take longer than 3 days to get issued.
@morph442
@morph442 10 ай бұрын
Awesome tutorial, very hands-on. Thanks a lot! No open questions
@jackmu3603
@jackmu3603 5 ай бұрын
Thanks Sam, this video was a great help. Love how you explain all of the steps
@totachava6235
@totachava6235 2 жыл бұрын
U have the best real world tutorials,thank you very much :)
@SamMeechWard
@SamMeechWard 2 жыл бұрын
Thank you 🤗
@nicholasfray9193
@nicholasfray9193 Жыл бұрын
Helped out a ton, and learned a lot. Thanks my dude.
@maksymchumak6583
@maksymchumak6583 Жыл бұрын
Great tutorial, very helpful!
@GauravSingh-747
@GauravSingh-747 Жыл бұрын
Thankyou so much for this video it really helps me to deploy my company project on AWS…thank you once again
@austinejose1516
@austinejose1516 8 ай бұрын
Very well explainer, Thank you!
@manfung6333
@manfung6333 Жыл бұрын
Really thanks to what you did! it really helps!
@user-pb3nv7id8g
@user-pb3nv7id8g 8 ай бұрын
@6:40 I had to change the "Default root object" to index.html instead of /index.html else you may get an "Access denied" error. Awesome explanation of course!
@user-yo2xq1rq3u
@user-yo2xq1rq3u 8 ай бұрын
I still get the "Access denied" error after removing the "/". By the way, the previous domains work well the `/index.html`.
@EddieMao
@EddieMao 4 ай бұрын
Great great video, thanks a lot, subscribed!
@renao_
@renao_ 3 ай бұрын
awesome video, thank you
@excelpowerg9559
@excelpowerg9559 Жыл бұрын
Gracias, video helped me fixed two issues i was having. One with Route 53, couldn't find my CloudFront resource after i created my simple policy record, which was a by product of the second issue, i failed to assign CloudFront my SSL certificate within the distribution settings. After doing those two things everything else was smooth.
@javv1748
@javv1748 2 ай бұрын
Excelente video
@lukagamulin9496
@lukagamulin9496 Жыл бұрын
this was awesome!
@SamMeechWard
@SamMeechWard Жыл бұрын
🤗
@user-wd4cq4mp9o
@user-wd4cq4mp9o 11 ай бұрын
so thanks of u bro it's very helpful
@SushilSharma-vp8cx
@SushilSharma-vp8cx 10 ай бұрын
Good work mate. I saw configure it through legacy OAI option is there any other way to implement cloudfront for you buckets ?
@ellmango
@ellmango Жыл бұрын
i got it working thank you. only thing i dont have working is that www doesnt direct to the cloudfront distribution
@fiddler-dv4or
@fiddler-dv4or Жыл бұрын
Yeah. I'm having the same problem too. Did you get this working, Corkpop?
@ashishwaykar2838
@ashishwaykar2838 7 ай бұрын
at 11:49 the reaction for quote with se* noticable 😂😂
@matthewigbinehi1610
@matthewigbinehi1610 3 ай бұрын
For the problem of stressful update, is it not more efficient to use Amplify instead of S3 bucket? Then continuous deployment is possible using Github as connection to Amplify
@kyoukai9379
@kyoukai9379 5 ай бұрын
does the domain name has to be from route53 or any domain name from any provider would be fine ? also what would be the cost of all that excluded the s3
@cdialpha
@cdialpha Жыл бұрын
Not sure if this matters, should you use a lower S3 storage class (e.g. Standard-IA, One Zone-IA) for the build files? Assuming that (1) you're relying on free teir and (2) it's for a personal site, you might not update them that frequently ?
@SamMeechWard
@SamMeechWard Жыл бұрын
I guess it really depends on each use case. If you know how your data will be accessed and you have specific needs, then a different storage class would be good. So if your personal site was rarely accessed by anyone Standard-IA might be good. But i've never tested these out thoroughly so I can't make any good recommendations.
@pelaoinfo
@pelaoinfo Жыл бұрын
it doesn't work when I refresh the page any suggestions?
@fullViewJay
@fullViewJay Жыл бұрын
I tried this process but I am getting a 405 error. I built a full-stack app with mongoDb as the backend
@wonderkiev
@wonderkiev Жыл бұрын
Any ideas how add www redirect? Thanks
@babytoystv1909
@babytoystv1909 3 ай бұрын
what happens if the server is restarted, how can i do it? my website is not showing up after restarted
@sitefleek
@sitefleek Жыл бұрын
I am getting served this error when i try to access my domain: This XML file does not appear to have any style information associated with it. The document tree is shown below. AccessDenied Access Denied PH0W267ETFMT2Y4H ckUFCC1qH8/wYNJR5HmrKV7bCkHLjkMto7ov7mVnhufdIdKFLMI1aETc0d09S9scmlVwRKsquC0=
@krish420
@krish420 11 ай бұрын
same, have you found any fix?
@sitefleek
@sitefleek 11 ай бұрын
@@krish420 yes, I had to change the permissions to the s3 bucket. For some reason if i only allowed cloudfront the access to my bucket, it gave this error. when I allowed open to all access to the s3 bucket, the error went away.
@krish420
@krish420 11 ай бұрын
@@sitefleek I also have some env elements do you know how to implement them?
@marcosmli
@marcosmli 9 ай бұрын
How do you invalidate browser cache?
@marcosmli
@marcosmli 9 ай бұрын
Dumb question, why two Route53 records?
@dmitrymatio
@dmitrymatio 2 жыл бұрын
All for me
@SamMeechWard
@SamMeechWard 2 жыл бұрын
Look at that nice community badge thing
@ursnj
@ursnj Жыл бұрын
Getting 403 access denied, anything im missing ???
@bwanamaina
@bwanamaina Жыл бұрын
go to cloudfront settings, add custom error messages, add error 403 , redirect it to /index.html with status code 200 ok. This should fix your issue.
@thanosavg9273
@thanosavg9273 Жыл бұрын
Update the bucket policy provided by CloudFront after creating the distribution
@quentinepitech
@quentinepitech Жыл бұрын
@@thanosavg9273 even after this i still have the forbiden... any ideas ??
@andrewd.1118
@andrewd.1118 Жыл бұрын
@@quentinepitech kzbin.info/www/bejne/Y4vMmqV8bMaja7c
@prerakhere
@prerakhere 7 ай бұрын
@@bwanamaina worst advice ever.
@hash510
@hash510 8 ай бұрын
today , aws cloudfront has other options to create distribution... It's useless
Deploy React App to S3 with Custom Domain
14:04
Sam Meech-Ward
Рет қаралды 21 М.
!! &&  #programming  #webdev  #reactjs  #nextjs #javascript
1:00
Sam Meech-Ward
Рет қаралды 62 М.
Stupid Barry Find Mellstroy in Escape From Prison Challenge
00:29
Garri Creative
Рет қаралды 21 МЛН
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 33 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Универ. 10 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:04:59
Комедии 2023
Рет қаралды 2,7 МЛН
Amazon S3 - Static Website Hosting with Custom Domain and TLS
16:28
Bryan Krausen
Рет қаралды 20 М.
React Proxy | Easiest Fix to CORS Errors
15:52
Sam Meech-Ward
Рет қаралды 79 М.
Deploy Static Website to AWS S3 with HTTPS using CloudFront
13:47
Shrikrishna Kulkarni
Рет қаралды 43 М.
Run your React app on Google Cloud
16:28
Google Cloud Tech
Рет қаралды 15 М.
CloudFront Signed URLs with Node.js
12:42
Sam Meech-Ward
Рет қаралды 20 М.
S3 Static website hosting with Cloudfront, Route53 and ACM by AWS Avinash Reddy
12:35
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 388 М.
Lid hologram 3d
0:32
LEDG
Рет қаралды 8 МЛН
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 1,4 МЛН