Join Brian Eiler for an in-depth discussion in this video Demo: Glacier and lifecycle rules, part of Amazon Web Services: Implementing and Troubleshooting IaaS Products.
- [Instructor] In this demonstration, we're going to look at how to use Glacier as well as set up some of the lifecycle policy rules. So, let's start off. We're going to go to Storage, and we'll find Glacier. And we can click on this. Now, we have a few different entries already existing, but let's go in and we can create a new one. So, we'll go to Create a Vault. And we'll give it a name. We can also note the region that we happen to be in is listed here for us. If we wanted a different region, we would need to cancel this.
And we could change the region up here in the top by selecting a different region from the list. In our case, we'll just call this one Test. You'd probably give it something hopefully a little bit more helpful. In the next step, we need to set up whether or not we want notifications. And when we look at the different types of notifications, we're looking for job completions, or things that have occurred to let us know that the different migration processes have been completed.
Now, in our case, we're going to do a demonstration so I don't really need notifications to let me know what's happening. But you could set it up here or even after the fact. Let's go to our next step. Now it's telling us that we're going to create the individual vault, so we'll tell it to submit. And now we can actually go in and make some changes. So let's go to our Test vault. We can see we've got a number of different options. Now that we have our Test vault set up, now we can go back to S3. So, let's go over here to Services, and we'll go to our S3 options.
We have a number of different buckets set up here that we can use. A source-test-bucket, let's pick this. Now there's some information that we have inside of this bucket. We can go over to the Management tab and we can set up a policy. So let's go to Management. Here we can set up different rules. It could be replication. It could be things like more or less pruning information out. So, in our case, lifecycle allows us to control how long things are going to live. So, in our particular case, let's go in and tell it that we want to remove old previous versions.
Now, we could set a filter to more or less limit what we're going to be applying to, things like tags that you could apply to your objects. For this case, we'll leave that empty. And we'll go to Next. The next section is called Transitions, and it's referring to what you want to modify. Are you looking for the current version of the object or previous? In our case, our rule specifically said previous. We could choose both in the same rule, but just for clarity, since I named it previous version clean up, we'll end up just select Previous versions.
And now we can tell it what to do. The transition that we're going to make is that we can say let's send this over to Amazon Glacier after a set amount of time. So, we're going to set it to Glacier after, let's say, give it seven days. And now when we hit Next, we can also choose whether or not we wan to remove them. So, in the same lifecycle policy rule, I could say that I would also like to make sure that we get rid of the previous versions after it's been deleted for just over one year.
It actually added one week to the 365 days. This would allow us to remove the object automatically. We don't need to worry about coming in and pruning it up later. So we'll go ahead and tell it that previous versions need to expire one year later, even though they were in Glacier and it's cheap. This just keeps a cleaner environment. So we'll hit Next. We can verify what's going to happen. It's going to basically remove previous versions from the entire bucket. It's going to move those over to Glacier for seven days.
And after 372 days, those previous versions will be destroyed. We'll hit Save, and there it is.
- AWS global infrastructure
- VPC use cases
- EC2 instance types
- EC2 purchasing and troubleshooting
- Creating AMIs
- Using AWS storage solutions such as EBS, EFS, S3, and Glacier
- Versioning and cross-region replication on S3