Check out more development related videos at: kzbin.info/aero/PL6_nF0awZMoNvi0QLmcv4qY5kfbnHrqg_
@Beachcasts5 жыл бұрын
Or to see how to create a REST API with Expressive, see: kzbin.info/aero/PL6_nF0awZMoMol4RPLf99WIZuoJ3l87oG
@sabirahmed61914 жыл бұрын
Thanks a lot! For people having issues with 502 redirects try the following 1. Check if http only is working (incognito) 2. If http works but https gives a 502, just add the same forwarding of http to https in your Target groups. 3. Now after the above step both http and https will work. 4. If you want to redirect http to https then remove the forwarding from http and make it redirect to 443 port in Target groups.
@Beachcasts4 жыл бұрын
Thank you for contributing.
@rathore3543 жыл бұрын
again i am saying this only video i found which the production level environment required don't believe my word check any video no one explained like you ... Many thanks you save my reputation at perfect time
@Beachcasts3 жыл бұрын
Thank you.
@antonionovak76394 жыл бұрын
For anyone having ERR_TOO_MANY_REDIRECTS error. You need to have additional Security Group for instance with inbound rules to allow traffic only from Load Balancer group. And Load Balancer Group to which is Load Balancer assigned need to be open to anyone. Beside that; Great tutorial! It saved me lot of time. Thanks!
@Beachcasts4 жыл бұрын
Thanks for sharing.
@orlandogunman5094 жыл бұрын
Just wanted y'all to know I used this tutorial to help with my set-up with several EC2 servers and their load balancer service over by Amazon. I used the SSL they provided though. This tutorial was helpful!
@Beachcasts4 жыл бұрын
Glad I could help
@dimef_5 жыл бұрын
You saved my sleep. I wasn't specifying the 443 target. I usually don't comment ever, but that god I clicked your video. Thank you!
@Beachcasts5 жыл бұрын
Thank you for the comment. So happy it saved you some troubles.
@rlee4315 жыл бұрын
Thank you for this tutorial. It's one of the most thorough tutorials on the subject, at least that I have seen.
@Beachcasts5 жыл бұрын
So happy it helped you. Thank you for letting me know.
@sillycoder96902 жыл бұрын
Man, your explanations are awesome. Great clip, thanks a lot!!!
@pkiekens4 жыл бұрын
Great video. Thx for sharing! One question though. At 12:38 , why did you copy the ID of the SgWebSvrBasicOpen security group to the inbound of the public loadbalancer. What is the connection here? What would be wrong with just leaving it open to listen on 80 en 443? After all, it's a public ELB.
@sbuckle11713 жыл бұрын
At 3:45 he says that SgBeachcasts Lb will be used by target instances - not LB.
@sbuckle11713 жыл бұрын
3:40, sorry
@Beachcasts3 жыл бұрын
I hope you found the video helpful, and have succeeded in what you needed to do.
@Tomsonx2324 жыл бұрын
THANK YOU!!!!!!! Not only did this solve my problem but it was incredibly easy to follow. Even though I came for one problem to get solved I HAD to subscribe
@Beachcasts4 жыл бұрын
Thank you. I hope you find many other problems to solve with my videos.
@sam683or5 жыл бұрын
it helped me a lot to setup SSL for our services, Awesome.
@Beachcasts5 жыл бұрын
That's terrific! Did you do the entire load balancer setup as well?
@jiahaotang19243 жыл бұрын
Thanks. But if you can test the load balancer at the end of this video by hitting the ec2 endpoint, that would be better!
@Beachcasts3 жыл бұрын
Great point! Perhaps I will recreate this with more details. I've also learned more since creating this video.
@Yermid4 жыл бұрын
Thanks so much for a very clear and focused and very professional video
@Beachcasts4 жыл бұрын
Glad you liked it.
@Drivez15 жыл бұрын
Great work Adam.Nice sunny 🌞 video. Really liked the AWS topic
@Beachcasts5 жыл бұрын
Thanks Marius. The topic was hot on my mind as this past week I had to implement this to help a client overcome a DDoS attack. However, learning this was painful because the docs were a little lacking and didn't smoothly cover how each step was required and linked.
@Drivez15 жыл бұрын
Beachcasts Tech Videos that is true. There’s steps you need to do before enabling the service. Great explanation on the. Learned from this 👍
@spotlessthoughful5 жыл бұрын
You can automate the process using lambda functions, look at the boto3 documentation for ACM, or even use the CLI commands and set up a cron job possibly.
@Beachcasts5 жыл бұрын
Thanks Nate. I certainly will look at that. Much appreciated.
@findbrownie3 жыл бұрын
Awsome, i want to know how the waf will be configured in front of elb, will it be pass through?, does the elb do ssl offload, do we need the ec2 server to also have a cert.
@Beachcasts3 жыл бұрын
It's been awhile since I've looked at that (WAF and ELB), but I think I remember setting up the WAF then associating it with the resource in the Web ACL Rules. Hope that helps.
@mvjrao1233 жыл бұрын
Nice one. I have a quick question. If I have more than one EC2 server behind the ALB should I use a separate SSL certificate for each server? what should these certificates contain in Common Name and Subject Alter Names? thanks.
@Beachcasts3 жыл бұрын
If I understand correct, the load balancer will have the publicly used cert. Servers don't really matter.
@hazzaldo5 жыл бұрын
Great tutorial and explanation. One question. You mentioned at 14:50 that as well as port 443, port 80 is also redirecting to 443 with 301 redirect. I didn't understand this point. Where did you set port 80 to redirect to 443. Is it in the HTTP 80 listener that you set it to redirect to Target Group 443? I couldn't tell because I didn't see the rules fo listener HTTP 80. Also how would you fix the issue of 301 redirect in this case? Thanks
@Beachcasts5 жыл бұрын
I did this in the Load Balancers area of EC2. I added/set the port 80 listener of a Load Balancer to redirect as the Default action. Hope that helps you.
@hazzaldo5 жыл бұрын
@@Beachcasts Thank you for your response. Apologies, but I didn't see that in the video. I saw you edit the rule for Listener HTTPS:443 where the action forward to Target Group 'beachcast443' at 11:50, but I didn't see you edit the rule on Listener HTTP:80 to redirect to Target Group 'beachcast443' as well. Was that meant to be the idea? Or am I missing something? Thanks
@Beachcasts5 жыл бұрын
You're correct. I didn't do that in the video. I learned it afterward. Give it a try in AWS. In the port 80 listener, delete the current action, and add a new action that redirects port 80 to the 443 listener.
@AlexkinSkywalker265 жыл бұрын
You are the best buddy!!, you really helped me creating a Load Balancer for a web site I have and finally it's working. Thank you so much, you earned a new suscriptor. :) ...
@Beachcasts5 жыл бұрын
Thank you. Happy it worked for you.
@JesusArriagaBarron5 жыл бұрын
that helped me a lot ... thank you for sharing it !
@Beachcasts5 жыл бұрын
Awesome. Thank you.
@dannymason39704 жыл бұрын
Great video, but I am just trying to understand , if I follow this video up to 16:15, does this add ssl to my site i.e. make it accessible via and add the green padlock?
@dannymason39704 жыл бұрын
Well, as a beginner to AWS and its intricacies, I followed this guide and although it appears my website is SSL certified, when I try and access it using , I get 502 bad gateway error :(
@Beachcasts4 жыл бұрын
No, this video does not cover how to fully set up the SSL. It only covers how to send http and https through the load balancer. I recommend you set up the SSL first, then add the certificates to the AWS Security Manager, to be used by the Elastic Load Balancer.
@iliketocode69864 жыл бұрын
so confused i followed along but we didnt create the beachcastOPENlb we just walked through how to do the secure one
@Beachcasts3 жыл бұрын
Hope you figured this out.
@TheSigil2 жыл бұрын
i’ve got it working for one of my sites but can’t figure out how to do it again. My cert is issuers but i’m having it trouble applying it. Can’t figure out were i went wrong
@Beachcasts2 жыл бұрын
Likely the security groups. I stumble on them every time. Good luck.
@TheSigil2 жыл бұрын
@@Beachcasts sounds about right. I still haven't fixed it. Do i set the security group to the cert manager certificate? Or the load balencer?
@er.ashishjetawat32015 жыл бұрын
My site has custom port like 54301, how I can configure SSL with it. Target group showing bad health. Please help
@Beachcasts5 жыл бұрын
I found it helpful to look at the server logs to see if AWS was hitting it.
@truepinoy754 жыл бұрын
Thank you for the useful video. Keep it up!
@Beachcasts4 жыл бұрын
Thanks, will do!
@jameshack59664 жыл бұрын
Thanks, brilliant. Massively helpful.
@Beachcasts4 жыл бұрын
Glad it helped!
@danc42683 жыл бұрын
Can this be done across instances in different regions? For example, I have a load balancer configured in Ohio region and it points to an instance in Ohio and also an instance in N. California. Is this possible to do?
@Beachcasts3 жыл бұрын
ELB is able to balance across availability zones, but not regions, as far as I know.
@yahhboyDrewskii5 жыл бұрын
If you are allowing all traffic in the open sg then referencing it in the lb sg then the lb sg is allowing all traffic. Thus, defeating the point of the elb. right? Thanks for the video btw!
@Beachcasts5 жыл бұрын
Thanks for the comment. Yes, the policy allows all traffic on given ports. (example: port 80 and 443) But also insulates the actual IP of the server from being known. Plus, allows additional rules and policies to be put in place prior to passing traffic to the server. (Example: only allow specific IP to hit port 22) This video was a very basic example to get it set up.
@yahhboyDrewskii5 жыл бұрын
@@Beachcasts Ideally, we would want to make the EC2 only allow access via port 80 and 443 from the IP of the ALB. Also, I ran into an annoying issue of my target groups failing the health check without a reason code being shown. For anyone else watching and having this issue, I had to install IIS and bind port 80 and 443 to the site then set the default document for the site. I then referenced the index.htm in the health check path in the target group. I confirmed access to the default file by accessing it from another server on the same network to ensure it was accessible and the target group health check wouldn't get a 404 error. Thanks again for the video and i look forward to your next one!
@Beachcasts5 жыл бұрын
Thanks Andrew. I think you misunderstood. In the video I show exactly that. Making it so only the traffic coming from the ELB makes it to the EC2 instance via internal IP. Also in the video, I show how I added '/index.php' to the targets so the health checks passed. Both valid points covered in the video.
@kenlang10704 жыл бұрын
Very good video! One thought though is with the health checks on redirect codes. Did you try putting it into the "Success codes" field, in the "Advanced health check settings" group, in the step 4 "Configure Routing" when making a new load balancer?
@Beachcasts3 жыл бұрын
Great idea. Yes, the expected results are important.
@sudhansharikatla88625 жыл бұрын
As I am new to aws, iam confusing about, we have only created listener 80 in routing, but in listeners section of loadbalancer , it is showing https: 443 also, here iam confusing, how it is showing https:443
@Beachcasts5 жыл бұрын
Unfortunately, I'd need to know more of your setup. Typically, though I didn't show this in the video, I set up everything to https:443. Then I set up port 80 as a redirect to 443. Hope that helps.
@arunnandgadi43483 жыл бұрын
I Have a query related to ALB, as my website is already having 3rd party SSL certificate and it's an HTTPS site, if I want to use and place ALB to handle traffic, should I generate a new certificate in AWS ACM and associate the same with ALB or can I use the same 3rd party certificate on ALB. Please clarify my confusion.
@Beachcasts3 жыл бұрын
Yes, in Certificate Manager you can add 3rd Party certs, and then use them. But honestly, easier to use a cert generated by AWS instead, and let the renewals get handled. Otherwise, you will need to re-upload the cert for every renewal.
@arunnandgadi43483 жыл бұрын
Hi, will be there any problem if both the certificates are running, say AWS certificate running on my ALB and 3rd part certificate running on the application server, will there be any conflict or complication of using both certificates.
@DiegoRFGonz883 жыл бұрын
why not leave the LB & EC2 open if is still poiting to an open SG? is the same thing :S what's the point?
@Beachcasts3 жыл бұрын
By implementing the ELB it gave me access to also use WAF to protect against common attacks. Not to mention removing the need for public IP on EC2 instances.
@comarkmaloba4 жыл бұрын
If you are using a debian OS in the EC2 instance, you can run a cronjob for LetsEncrypt to run every 3 months, needs some terminal intervention.
@Beachcasts4 жыл бұрын
That is exactly what I need. Any resources you can point me to?
@moonferoc70984 жыл бұрын
I did, but it's not enabling port 443 for my instance. The link to my instance is still unsecured. Please help!
@Beachcasts3 жыл бұрын
Hope you've figured this out since then. Thanks for watching.
@chrisjordanaliac80264 жыл бұрын
Great and Informative video. I have a question: how do you tie in autoscaling with the load balancer? im a newbie at this
@Beachcasts3 жыл бұрын
Great question. I'll hold onto this for future content. Thank you.
@sabuein4 жыл бұрын
Thank you very much.
@Beachcasts3 жыл бұрын
You're welcome. Thanks for watching.
@MrSSRao224 жыл бұрын
Hi, Thank you for the tutorial. Was very helpgul. I am new to web hosting and trying to learn it. I setup my SSL and Load Balancer in the same as shown in the tutorial, I get a 502 Bad Gateway error. When I try without the load balancer it works fine without https. I saw in the comments that you had mentioned to look at server logs. By server logs do you mean I have to setup server access logs. Thanks in advance.
@rathore3543 жыл бұрын
put / only
@Beachcasts3 жыл бұрын
Server logs (like Apache) will show the responses, so you can see how your server is reacting to the health checks. Maybe it is sending 302 redirects, or something else. You can also customize the health check to look for a specific file "/index.html" for instance.
@fvdstone4 жыл бұрын
Why do you use a Let's Encrypt certificate? Aren't public certificates in ACM free? And why do you encrypt the traffic between the load balancer and your server instance? Woudn't it be enough to just let the load balancer terminate HTTPS and reach your backend server via http/80?
@Beachcasts3 жыл бұрын
Thanks for sharing. Yes, you are correct, no need in most cases to encrypt traffic between the load balancer than server. I have a project where I use Let's Encrypt for other things, so wanted to carry it over to the load balancer. Othewise, not really needed.
@sasogeek5 жыл бұрын
If I'm not using Route53, how do I point my dns to the load balancer correctly? (can't set it as an A record)
@hamiltonvera41515 жыл бұрын
every load balancer creates an endpoint, you have to use CNAME in your DNS
@Beachcasts5 жыл бұрын
There are other DNS providers that also allow ALIAS types, but I don't know of any. I see another commenter mentioned CNAME, but I'm not sure if that will work for zone roots.
@sasogeek5 жыл бұрын
Beachcasts Programming Videos The CNAME worked, turns out the reason the routing didn't appear to work was because I had set the lb and instance to have the same security group, but I had to give them different security groups and allow traffic to the instance only from the security group that the load balancer had since I didn't want to expose the instance itself to the world.
@Beachcasts5 жыл бұрын
@@sasogeek Thanks for sharing!
@annaishmukhametova4 жыл бұрын
instrad of A record use CNAME?
@CoolBishop19974 жыл бұрын
thank you for the video sir
@Beachcasts4 жыл бұрын
Most welcome
@orrlevinger4 жыл бұрын
im totaly confused with the Security groups allocations once you call it the load balancer SG and a second later you call it the instance security group.. you name it LBsecurity group but assign it to the load balancer.. every thing else is amazing but i lost you at the security grouping :(
@Beachcasts3 жыл бұрын
Sorry about that. I was also struggling with it at the time. I should do a follow-up video to more thoroughly explain that portion. I've added it to my pending video list. ;-)
@cultclassic9994 жыл бұрын
Great tutorial! Thanks!
@Beachcasts4 жыл бұрын
Glad you found it helpful. Thank you.
@jpsaroud4 жыл бұрын
Thank you very much!
@Beachcasts3 жыл бұрын
You're welcome!
@Tux0xFF4 жыл бұрын
That t-shirt is awesome
@Beachcasts4 жыл бұрын
Thanks for that. I need to add it to the merch merch.streamelements.com/beachcasts
@info6624 жыл бұрын
Thank you for the informative video. Is it possible to also redirect from www.domain.com to domain.com? I have a Fargate Setup, Loadbalancer, etc.
@info6624 жыл бұрын
I found out how, thank you anyways :)
@Beachcasts3 жыл бұрын
Thank you for the added question.
@Beachcasts3 жыл бұрын
Glad you figured it out. Thank you.
@dashcamspotted8874 жыл бұрын
Please make a tutorial of ALB and NLB so that I would get a static IP address. Because ELB is dynamic IP address.
@Beachcasts4 жыл бұрын
Great ideas! Thank you.
@emax834 жыл бұрын
Thank for your video, you did many trick that other tutorials skip. Thanks, but.. i still cannot use SSL, i followed any step but nothing to do.. I have EC2 Windows with IIS, configured loadbalancer, listners, sec group but still nothing HTTPS, the TargetGroup for 443 it's unhealthy.. i really don't know what to do with AWS.. many other provideres need only one click to enable ssl/https.. amazon aws need hours of configuration...
@Beachcasts4 жыл бұрын
Try looking in the server logs of your EC2 instance. Often you can find the reason there. Often it is a bad route, or some small missing thing in the checks. Good luck.
@paulhanrahan67284 жыл бұрын
Very helpful. Just have to fix the 503 error now.
@Beachcasts4 жыл бұрын
Thanks for watching. Did you figure out the issue? I found that 503 happened most times from routing issues. I had to specify 'index.php' in my case for the app to resolve in quality tests.
@paulhanrahan67284 жыл бұрын
@@Beachcasts I did. A simple error on my part.
@Beachcasts4 жыл бұрын
@@paulhanrahan6728 Thanks for the update.
@exalandconcept4 жыл бұрын
Thanks for this tutorial :) i like it
@Beachcasts4 жыл бұрын
Happy you found it useful. Thank you for watching.
@Constantine7694 жыл бұрын
Thank you!
@Beachcasts3 жыл бұрын
Very welcome.
@TheSkipinder4 жыл бұрын
Thank a lot! This helped immensely.
@Beachcasts4 жыл бұрын
Glad it helped!
@rmuchala5 жыл бұрын
I did everything in the video, but I cannot get to my site at the end of it. - I get 502 Bad gateway
@Beachcasts5 жыл бұрын
Take a look at your website logs and see if the checks are hitting it. Might shed light on the fails.
@rmuchala5 жыл бұрын
no It is not even hitting it. I get bad gateway. 502.
@dannymason39704 жыл бұрын
@@rmuchala Did you resolve this issue? I have just followed the guide and have the same problem :/ There is nothing complex about my EC2 instance. It is a simple website created in Elastic Beanstalk and dns for the friendly domain managed in Route53.
@rlee4314 жыл бұрын
@@rmuchala I would go through the checklist. Try another browser and/or clear your cache and try reloading. I hope this helps.
@orlandogunman5094 жыл бұрын
I was expecting you to test the access and show that it was blocked e.g., to see if what you did worked.
@Beachcasts4 жыл бұрын
Originally I did do that while recording, but removed it because the quality of the section was not as expected. Decided not to re-record. ;-)
@LordLazaruss4 жыл бұрын
I got to the point of creating a certificate and then got stuck because i don't have my domain.
@Beachcasts3 жыл бұрын
Yes, a domain is needed for the cert.
@TheBanker17104 жыл бұрын
Hi, thanks a lot for this very helpful video. After configuring my Load Balancer, I got a 504 error to reach my web application under IIS turning on port 1004. I create a target group on port 1004 and I made a rule to redirect my domain devtf.profilegroup.com (which is redirected by CNAME to my load balancer) to my specific target group 1004, why did I make wrong? Thanks for your help. :-)
@Beachcasts4 жыл бұрын
The load balancer doesn't really care what web server you are using. It simply forwards the port based on the Target you set up in the load balancer. Make sure your security groups are configured correctly.
@TheBanker17104 жыл бұрын
@@Beachcasts Thanks a lot for your answer. I finnaly found the issue, I had to open the ports on the server in the Windows firewall. :-)
@annaishmukhametova4 жыл бұрын
@@Beachcasts can you explain why we in security group load balancer added another sg-..52e ID sg ?
@ezequiel_lopez4 жыл бұрын
thanks a lot!
@Beachcasts4 жыл бұрын
You're welcome! Thank you for watching.
@rameshkhadka56814 жыл бұрын
Sweet. Thnx
@Beachcasts4 жыл бұрын
You bet!
@zzSoloo3 жыл бұрын
Just lol at fresh getting finessed
@Beachcasts3 жыл бұрын
Glad you found it helpful.
@zabagar3 жыл бұрын
Would prefer to see a load balancer setup to 2 endpoints not a single machine. There’s no load balancing if you only have 1 machine in the pool.
@Beachcasts3 жыл бұрын
Fully agree. It was a missed opportunity to include that in the video. However, I hope folks watching go the next step.
@rathore3543 жыл бұрын
Dear Sir AWS load balancer i watched 100 time from different tutor but what deep things you explain no one had explained . request you at least come with one video per month for AWS
@Beachcasts3 жыл бұрын
I like this idea. Thank you. Stay tuned.
@luckeyzlion4 жыл бұрын
It lucks demo. The tutorial would be completed if you show us what the end result is.
@Beachcasts3 жыл бұрын
Thank you. I agree, this video could have been more complete. I'm thinking of creating a new one with what I've learned since then, as well.
@barronanderson78675 жыл бұрын
I had a hard time following this instructional video. Perhaps providing a summary of the activities before starting would be helpful. I felt like we bounced around and I couldn't keep track of what we were trying to achieve. It's clear you know what you are doing and what you want to achieve. The challenge is translating that to people who are unfamiliar with the topic.
@Beachcasts5 жыл бұрын
Thank you Barron. It was indeed a challenging topic I'd leaned mere hours before creating the video. Thanks for the feedback.
@markcuello5 Жыл бұрын
HELP
@achraffahmi70834 жыл бұрын
😃😃😃
@Beachcasts4 жыл бұрын
Thanks.
@Broadberryinc3 жыл бұрын
Too confusing
@Beachcasts3 жыл бұрын
It can be. I've thought about creating a newer version of this, that is a little more simple. I've learned much more since creating this video.