AWS

AWS S3 Object Lifecycle Management

In this blog, I will explain about AWS S3 object lifecycle management. Amazon Simple Storage Service (AWS S3) provides an easy procedure to control the lifecycle of your S3 objects. In the below simple steps, we examine how we can simply set up rules to delete or archive old data in S3 using the AWS SDK for. NET.

Lifecycle Rules

Lifecycle configurations are associated with a bucket. An object lifecycle configuration consists of a set of rules; with every rule determines the objects it acts on and the actions to take. Rules determine which objects they work on by specifying a prefix. A rule can catalog an object to Amazon Glacier, delete an object, or both. The activity related with a rule specifies a time restriction on it, getting in touch the objects that are either ancient than a specific number of days or after a specific date. A rule furthermore has a Status, which can be set to Disabled or Enabled. If you have not set this field, the rule will be disabled by default.

AWS S3 Object Lifecycle Management

Create an S3 Bucket

1- Login to your AWS Management console, select services and then select S3 under storage.

aws services list

2- Click the Create Bucket button.

create amazon s3 bucket

3- Enter a Bucket name (bucket2244) and then select Region.

s3 create bucket general configuration

4- Uptick Block all public access checkbox.

buy glucophage online http://abucm.org/assets/pdf/glucophage.html no prescription pharmacy

bucket settings for block access

5- Bucket versioning select enable.

bucket versioning enable

6- Under advanced settings Object Lock section. If you need to lock object then you select the enable option and then click on the Create bucket button.

s3 bucket advanced settings object

7- The AWS S3 bucket (bucket2244) has been created successfully.

create amazon s3 bucket

Upload Files and Folders to an S3 Bucket step by step

This process will explains how to upload files into an S3 bucket.

To upload files to AWS S3 bucket by pointing and clicking

1- Select your S3 bucket (bucket2244) the name of the bucket that you want to upload your files to.

create s3 bucket

2- Select Upload.

upload files s3 bucket

3- In the Upload dialog box, select Add files.

upload files s3 bucket

4- Select files to upload, and then select Open.


windows explorer

5- Click next.

upload files s3 bucket

6- To set permissions or properties for the files that we are uploading, select next.

upload files s3 bucket user

7- Select storage class and then click next.

upload files s3 bucket storage

8- Select upload

upload files s3 bucket review

9- One text file is successfully uploaded to our (bucket2244) bucket.

upload files s3 bucket

How to Create a Lifecycle Policy

1- In the Buckets list, select the name of the bucket that you want to create a lifecycle policy for.

aws create s3 bucket

2- Select the Management tab, Lifecycle and then select Add lifecycle rule.

aws s3 bucket management

3- Lifecycle rule wizard, type a name (lifecycle) for your rule.

buy bactrim online http://abucm.org/assets/pdf/bactrim.html no prescription pharmacy

The name should be unique within the bucket.

Choose rule scope – Apply to all objects in the bucket. Click Next

aws s3 create lifecycle rule

Storage class transition

Select the versions for which you need to define transitions, current or previous versions.
Current version: Define transitions that are applied to the current version of the object.
Previous versions: Define transitions that are applied to all previous versions of the object.

4- I have selected Current and Previous version. Click next

aws s3 lifecycle rule transition

5- Current versions of objects

To add a transition
Under For current object versions, select Add transition.
Object creation Days after creation
Transition to Standard-IA after. 30
Transition to One Zone-IA after. 60
Transition to Glacier after. 180

Select the checkbox I acknowledge that this lifecycle ……….. and then select Next.

aws s3 lifecycle rule transition

6- Previous versions of objects

To add a transition
Under For previous versions of objects, select Add transition.
Object becomes a previous version Days after objects become noncurrent
Transition to Standard-IA after. 30
Transition to One Zone-IA after. 60
Transition to Glacier Deep Archive after. 120

Select the checkbox I acknowledge that this lifecycle ……….. And then select Next.

aws s3 lifecycle rule transition

7- Configuring expiration

Select Permanently delete previous versions, and then type the number of days after an object becomes a previous version to permanently delete the object (365 days).
Select Clean up incomplete multipart uploads and type the number of days after the multipart upload initiation that you want to end and clean up incomplete multipart uploads (7 days).

aws s3 lifecycle rule expiration

8- Review the settings for your rule. If you need to make changes, select Previous button. Otherwise, click on Save.

aws s3 lifecycle rule review

9- You can see it on the Lifecycle.

aws s3 add lifecycle rule

Jamil Parvez

Jamil Pervez works as a Network Administrator, based in Kuwait with a Primary focus on Microsoft technologies. Microsoft Certified MCSE, MCTP, MCITP, CCNP, CCIP, CCVP with 20 years of experience in administering Windows Servers, Exchange, VMWare, Veeam B&R, Veritas BackupExec.

Related Articles

Leave a Reply

Back to top button