Amazon S3 GetBucketLifecycle API

Download Amazon Cloud Connect Setup File
Download Amazon Cloud Connect Zip File

Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management.

To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

GetBucketLifecycle has the following special error:

  • Error code: NoSuchLifecycleConfiguration

    • Description: The lifecycle configuration does not exist.

    • HTTP Status Code: 404 Not Found

    • SOAP Fault Code Prefix: Client

The following operations are related to GetBucketLifecycle:

Request Syntax

GET /?lifecycle HTTP/1.1 Host:

URI Request Parameters

The request uses the following URI parameters.


The name of the bucket for which to get the lifecycle information.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax


Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.


Root level tag for the LifecycleConfiguration parameters.

Required: Yes


Container for a lifecycle rule.

Type: Array of Rule data types


Sample Request: Retrieve a lifecycle subresource

This example is a GET request to retrieve the lifecycle subresource from the specified bucket, and an example response with the returned lifecycle configuration.

GET /?lifecycle HTTP/1.1 Host: examplebucket.s3.<Region> x-amz-date: Thu, 15 Nov 2012 00:17:21 GMT Authorization: signatureValue

Sample Response

HTTP/1.1 200 OK x-amz-id-2: ITnGT1y4RyTmXa3rPi4hklTXouTf0hccUjo0iCPjz6FnfIutBj3M7fPGlWO2SEWp x-amz-request-id: 51991C342C575321 Date: Thu, 15 Nov 2012 00:17:23 GMT Server: AmazonS3 Content-Length: 358 <?xml version="1.0" encoding="UTF-8"?> <LifecycleConfiguration xmlns=""> <Rule> <ID>Archive and then delete rule</ID> <Prefix>projectdocs/</Prefix> <Status>Enabled</Status> <Transition> <Days>30</Days> <StorageClass>STANDARD_IA</StorageClass> </Transition> <Transition> <Days>365</Days> <StorageClass>GLACIER</StorageClass> </Transition> <Expiration> <Days>3650</Days> </Expiration> </Rule> </LifecycleConfiguration>