Join Brian Eiler for an in-depth discussion in this video Troubleshoot modifications, part of Amazon Web Services: Implementing and Troubleshooting PaaS Products.
- [Instructor] In this demonstration, we'll pick up where we left off where we were working within Elastic Beanstalk and we were working to modify the application. Let's go back to Elastic Beanstalk and take a look. Now, inside of our new Hello World environment, we're going to expand this. And if we look at the event logs, if you recall, we had a problem where we tried to make the application in more of a high-availability mode. And the issue was that there was no default subnet in the particular availability zone that we were working in.
So, tracing that back, we go up to Services, and that's to be found underneath of the VPC options. We can see that we have a default VPC if we go over here to VPC. The default VPC in this case exists, and the dilemma that we were faced with was that when you go over to Subnets, somehow two of the three subnets had been removed from this particular region. And so, when the load balancer went to deploy its services, it could not find IP addresses in the appropriate zones.
So, by going to the CLI we were able to recompose those particular subnets. And now when we go over to Elastic Beanstalk, we should be able to change the configuration of this application. So, let's go back to that process. We're going to go to the environment. And now we'll go to Configuration. And under Capacity, we'll click Modify. We're going to change this to a load balanced instance. And this time I'm going to tell it that we want at least two instances, and that we would like this to be in any two zones.
That way we're guaranteed to have two particular web servers running, and it will be located in two different availability zones for the maximum availability for this application. Then we go down, just make sure that those thresholds for the scaling is set to the way the application would behave. And then we can tell the system to save the changes. Now, once we've made our changes here, we can just verify that we have the rest of the configuration laid out the way we want. Now, in this case cross-zone load balancing is turned off.
So, we can turn that on later if we want to balance the drive here crossed, otherwise it'll be configured more in a failover configuration. In our case, we'll leave it as the defaults for now. And let's hit Apply. Now again, it prompts us and lets us know that we're about to change things up. And it's going to replace all the instances once we finally move over to the LoadBalanced form. We'll hit Confirm. Now as before, this operation may take a little bit of time.
So, we'll watch what it's doing as it moves through its process. In fact, to get a better view of this, why don't we switch over to the Events screen and then we can just watch as the things are added to the log. We'll accelerate this video to make things a little bit more interesting for you. But understand this may take several minutes for the process to actually complete. Now, what you've noticed in the logs are that we've now created an instance. The load balancer is enabled.
And we've now also added an auto-scaling policy that allows the instances to increase or decrease depending on the load of the particular application. And there we have it. The environment has been updated, and we get a brief warning while the system was transitioning. But if we go over to the Dashboard now, we should see that we are perfectly okay. The environment's been updated successfully, and it confirmed us. Let's go over, look at the configuration.
We can see that we are set still at load balancing for any two instances. To further verify that we are configured the way we expect, let's go over to our Services and look at EC2. Now, instead of one instance we have two, and we can see that these two instances are located in two different availability zones. So, we have us-west-2a and us-west-2c. And this gives us that fault tolerance that we need for a production application.
So, let's go test the application one more time. We'll go to Elastic Beanstalk. We'll see the individual environment that we have here, which will then provide us with a URL up at the top. When I click on it, our application launches and we can see we're in Hello World Version 1.0.
- Creating an IAM user, group, and role
- Using the IAM policy simulator
- IAM best practices
- Components of CloudFormation
- Benefits of Elastic Beanstalk
- Working with OpsWorks
- OpsWorks for Chef Automate and Puppet Enterprise