From the course: AWS for DevOps: High Availability and Elasticity

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Code tools for high availability

Code tools for high availability - Amazon Web Services (AWS) Tutorial

From the course: AWS for DevOps: High Availability and Elasticity

Start my 1-month free trial

Code tools for high availability

- [Narrator] Now, in terms of programatic access for HA scenarios, again I'm going to work with EC2, and I'm going to look at working with elastic IP addresses and you might remember that this is a common scenario where you are going to have multiple instances or instances that will go up and down and the IP address will be associated and disassociated. So what I have here is I have a elastic IP address that is not associated to an instance, so you can see it here and the first script pattern that I'm going to show you is how to query to see if you have any elastic IPs that are not associated or what the status of them is. So, let's do that first. So the now familiar script pattern is that in line one, we use the sdk, line two, we update the region, line four, we create an EC2 instance variable, in line six, we could put parameters, but we've chosen not to, we're going to get all the IPs, line nine is the key line here, so we take the EC2 instance variable and we call the describe…

Contents