Elastic Beanstalk Features & Config | Amazon Web Services BASICS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone my name is max welcome to this video great to have you on board I already traded a couple of videos where I showed what AWS is and how we can use elastic Beanstalk to host an application a lateral application to be precise this one year now in this video I want to take a closer look at what elastic Beanstalk actually depth behind the scenes and what we can configure about our environment what environments actually are and what we generally can do in this elastic Beanstalk console so let's get started so mainly counsel of my project of this lateral project I deployed in this video here that's the right side I hope so so this video and as you see is running application it is connected to a database and we already deployed two different versions of the application in that mentioned video now if we start here on that dashboard of this environment we're already one level queue deep into dad application then I want to be so let's instead switch to all applications where we see not just the environment but actually all our applications and there is a difference an application in elastic Beanstalk may contain multiple environments as you can see on this application lateral simple block is the application and we could create more applications and prod here is the one environment in this application and we could also create more environments environments would be something like a testing environment a production environment may be a new version of your app in a new environment these would be environment and they run separated from each other each on their own servers you can simply create a new environment and then again you have to go through that wizard where you set it up and assign a server and so on you can also use the elastic Beanstalk CLI at which I won't have a closer look in this video to do all this to create new applications and new environments with that out of the way let's go back to this environment here we see the dashboard where you see the current status of our application the recent events that are successfully updated the environment because the shipped new code which operating system were actually running and so on we can deploy new version 2 of the upload and deploy button we could always use to CLI to automate this and then we have all these options on the left now before we go to configuration let's have a look at logs here we can actually retrieve our logs and for that we have to request them so we can request the last hundred lines here and logging is set up automatically for us this however now fetches the latest logs and now we could download them and have a look at so if you click this button we see the latest log files and you will see what happened on our server that we had a 400 feet free error there and well whatever happened on the server these are logs and certainly something which might be interesting to you in a real application where you want to well detect any anomalies detect any errors stuff like that we also get the Health section this shows us the overall health of our application we can see the kind of requests we gather the responses we send and since this applications pretty new most of that is not populated yet but here we can monitor what's going on and we can drill down on that and see how many instances we have running one and how that is well feeling right now it's okay as a side note and I did show this before in another video you can always switch to ec2 console I'm doing the same you tab and here under running instances this instance is the one connected to our elastic Beanstalk setup or it's the one managed through elastic Beanstalk so this is the one instance we're referring to here and we can see that here this is the instance ID and as you will see it's obviously the same ID as here so that is the ID and here while we could for example do something with it like reboot or terminate it if we wanted so this page allows to track the health of our instances and therefore the health of our application under monitoring we can see how our our F behaves in some charts so the CPU utilization and so on so this is a lot it gives you a nice and quick overview over what's going on in your application without looking at the logs and so on under alarms you see any alarms you might have gotten you can configure them under monitoring here here for example you could set an alarm on environment health and you could configure when you want to get an alert for example at the environment health is below a certain status for 1 minute or something like that and you could set up that you get an email when this happens also very nice for production applications managed updates is pretty you can set it up under configuration so I will come back to this here on this page you'll then get an overview and managed updates will allow you to opt into managed updates through AWS so that they update critical software on your instance automatically for you which of course is important from a security perspective now under events you can see which events we had for example that we updated the environment and how that went and under text we can assign some tags or CD assign tags to be precise which will show up in our billing for example so that we can track where our costs are coming from these are all these options now let's have a look at configuration that's probably the most interesting one well here for example to go from start to end we have scaling if we open this we see that right now we have a single instance scaling and that is because we only have one instance now of course as your application grows you might want to have more instances here which distribute the load you could then switch to load balancing is auto scaling and there you could then USB built-in tools load balancer and auto scaling these are services provided by AWS which will distribute incoming traffic evenly amongst all your instances and which even allow you to spin up new instances to handle certain traffic spikes and remove them once they're not needed anymore so that's really powerful I'll go back to a single instance but this is something you definitely want to look into once your application grows and you need more servers back to single instance you can all choose in whichever lab dalek you zone you want to launch new instances however I will leave this at the minimum and for now we only have that one instance that leads us to the instances here you can see which type of instance were using and we could change this to upgrade our application to a weld pool more powerful instance for example we can also see which security group this instance belongs to security groups are basically firewalls you could say which allow or which control which traffic may reach our instances and which traffic may leave our instances here we can set up easy to keep air which you'll need if we manually want to connect to the instance through SSH then we will need this key pair to identify ourselves and set up our encrypted access to the key or to the ec2 instance the instance profile here that is one will we can't change anything here this is required by elastic Beanstalk we have to write permissions to manage the instance for you it was created automatically and it basically allows elastic Beanstalk to spin up incentives terminate em and so on so what it needs to do behind the scenes for us how often should monitor the health of the instances which ami it uses to which image this defines the operating system and software installed on that instance and then here we can also setup which kind of volume you want to have like your the default we could attach an SSD and define how much space you want to have so here we can control the server we're running on and again we can't after it here vertically choose a stronger instance or we go back to scaling and switch from single instance to load balancing all scaling to launch multiple instances so when we do that and click apply and this will now update our application and as it informs us replace all our current instances so let's click Save be aware that switching from one to multiple instances may occur cost especially if you leave it run for a whole month because you only have one month where 750 hours which is one month in hours per month of the t2 micro instance is available so if you spend up two of them you're going to pay for one of them if you spend up more powerful ones you're going to pay more so be aware of that still I'm going to show this to you now this may take a couple of minutes here actually since it's switching your complete environment and in the ec2 management console you should see that from some point on it will terminate this instance and spin up a new one now I did finish and if we go get back to configuration we see that now under scaling we can configure more we can configure all the scaling and here we can set up how many instances servers we want to have at a minimum and at a maximum and also in which availability zones we want to launch them this now allows AWS to automatically scale our instances of add new servers on which our application will run whenever we hit a traffic spike for example the scaling trigger is set up here and there it configures upon which condition it will add new servers and how long that condition has to be true that is a powerful tool since it allows you to really react to traffic spikes it's also a kind of advanced tool not in terms of setting it up that's what there was easy but in terms of getting it right for big applications and I just want to give you a sneak preview here for your ordinary normal application the default setup will should be absolutely fine for bigger applications though if that is how our traffic works over a day over 24 hours for example then we could have a default setup of this we have a constant amount of service we have no auto scaling and we have only one server up but this server is constantly a very relatively strong server now the problem with this approach is that we will face server issues during these spikes because the server capacity doesn't suffice so an alternative might be to set up auto scaling with twice the amount so now if we have Q's servers up in each hour here and that is an app capacity for all the spikes of course all's a lot of wasted or overhead capacity so we're paying too much a better solution would be to use auto scaling and there we bring up additional servers when we need to handle these spikes much better already but still as you can see there is a lot of overhead or at least a bit of overhead so we can do better so the perfect approach would be to calibrate all the scaling to launch smaller instances not such powerful ones but more of these however in the long term are overall it will still be cheaper because the powerful ones are more expensive and we don't require them for most of the time so this might be a perfect auto-scaling setup where we scale up to four of the not so powerful instances and we really calibrate our application to handle these traffic spikes now that is quite advanced but that is how all the scaling works it adds new servers to handle incoming traffic spikes and it is a lot about really testing that and seeing what is best from a cost and server perspective that was a little advanced topic let's go back to elastic beanstalk auto scaling is set up that is what we can take away from that and not just all the scaling also load balancing because load balancing is the other interesting thing in that equation we might have more than one instance we are free now all these instances are doing something so one instance might not be so much under stress another one might be very stressed and might be close to well being overloaded with an incoming request and this request might do to our setup whatever hit instance free which can handle it by which is not the best instance instead we should handle it here and that is exactly what load balancing will take care of with load balancing we have two instances and we have a service called elastic load balancer also added to our elastic Beanstalk setup here so both elastic but two different services and this service elastic load balancer will route incoming requests cue different instances depending on their health their response time to see how occupied they are so it may route one request to instance one and a second one to instance two we can even combine this with auto-scaling queue add new servers where needed auto scaling will for this all the reuse you set up off the existing servers to copy our set up in our application and load balancer will pick these new servers up and all those forward requests to them so that is how both works together and you don't have to manage anything about that it's all set up here by elastic beanstalk you can calibrate it a bit here you can set up your scaling triggers and to find how many instances you want to launch and so on you can still choose which type of instances that would be here under instances so these instances will be launched by the auto scaling and that is how these two work together and really make sure that your application works as it should as you can see if I waited it it still works as before but under the hood it now has a more complex setup that was a lot of talking about all the scaling and the instances but it is important to understand what's happening here and what elastic Beanstalk can do for you in bigger applications auto scaling and distribute incoming traffic amongst all instances you might have running what about notifications here you can get notifications you can set up an email address where you will be informed about elastic beanstalk events like if the health transitions to degrade it or something like that under software configuration we already saw that in another video you can define things about your server basically from where your web app is served which how much memory should be allocated how you want your outputs errors and then some stuff about logging also very useful of course updates and deployments is interesting because here you can configure how updates so new code should be shipped to your servers if you have more than one instance you can actually choose rolling if you have only ones that will not be available because what will Rowling do if you have more than one instance it will ship new code to one instance first and then ship it to the next one so that you all the time until all instances have been updated have instances with old code and new code and hence your application is always online because it's the old code or it already was updated if you only have one instance there's of course a short window a short time window where it will be offline because the code is getting replaced right now rolling can prevent this if you have multiple instances there are some Advanced Options here and you can always learn more as you can see but that is basically what you can configure here now besides the application deployments you can also change configuration updates so whenever you change the configuration of your server and there you can also set this to rolling for example and configure how these changes should be rolled out because just like your application code if it changes if you change the configuration even worse than your application code there may be a server restart required so that is something you also want to handle this is what you can configure here your game can also configure all the scaling here but that could be done under scaling so that's updates and deployment health here you can determine or you can setup how elastic load balancer will find out if your application if your instances are healthy you can pass your own URL where it should send a ping and depending on the ping he'll pass this ping response and if it responds at all it will determine if your application is healthy the default should be fine here but you can configure elastic load balancer here a bit more if you are interested in that finally managed updates that's also interesting here you can configure if AWS elastic beanstalk should update your server your your software on the server it will not install breaking changes or breaking software changes but it can install mine or attach updates or just patch if you read just want to get these security patches so that's a useful feature to make sure that your application is always up to date and that you get the latest security fixes now this will update the application we can still move on to the last thing or to the almost last config item here the data here the database we did set this up in a different video here you can basically change some of the configurations for example which kind of database you use you could upgrade here our things can't be changed here you can always use RDS to change things though then you will also well remove it from from here so it's preferable that you change it here in the elastic Beanstalk console to stay in that elastic Beanstalk world where elastic Beanstalk manages everything for you and finally at the bottom on the network here you can set up how your application is served and how it is reachable it is important for the load balancer here here you can configure this elastic load balancer is a bit more can set up how it determines the instance help and so on and that is really something where you can dive in deeper if you know how it works as always all the default settings should be fine these are always things you can change but for a starting application you don't need you and as you work more and more with a tell us you will get deeper into it and know what you may change and why so this was an overview over elastic Beanstalk what you can view here how it works how you can upgrade from your simple single instance application to a multi instance auto scales load balanced application I hope this was helpful and you didn't choice and that with that and the other videos using AWS and using Beanstalk is a bit clearer it might look intimidating if you see all these options but always keep in mind you can start it simple and then add more and more features as you need them
Info
Channel: Academind
Views: 53,467
Rating: undefined out of 5
Keywords: elastic beanstalk, aws, amazon web services, tutorial, config
Id: PKjbuxnispM
Channel Id: undefined
Length: 19min 14sec (1154 seconds)
Published: Mon Jun 19 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.