

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Lightsail::Bucket
<a name="aws-resource-lightsail-bucket"></a>

The `AWS::Lightsail::Bucket` resource specifies a bucket.

## Syntax
<a name="aws-resource-lightsail-bucket-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-lightsail-bucket-syntax.json"></a>

```
{
  "Type" : "AWS::Lightsail::Bucket",
  "Properties" : {
      "[AccessRules](#cfn-lightsail-bucket-accessrules)" : AccessRules,
      "[BucketName](#cfn-lightsail-bucket-bucketname)" : String,
      "[BundleId](#cfn-lightsail-bucket-bundleid)" : String,
      "[ObjectVersioning](#cfn-lightsail-bucket-objectversioning)" : Boolean,
      "[ReadOnlyAccessAccounts](#cfn-lightsail-bucket-readonlyaccessaccounts)" : [ String, ... ],
      "[ResourcesReceivingAccess](#cfn-lightsail-bucket-resourcesreceivingaccess)" : [ String, ... ],
      "[Tags](#cfn-lightsail-bucket-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-lightsail-bucket-syntax.yaml"></a>

```
Type: AWS::Lightsail::Bucket
Properties:
  [AccessRules](#cfn-lightsail-bucket-accessrules): 
    AccessRules
  [BucketName](#cfn-lightsail-bucket-bucketname): String
  [BundleId](#cfn-lightsail-bucket-bundleid): String
  [ObjectVersioning](#cfn-lightsail-bucket-objectversioning): Boolean
  [ReadOnlyAccessAccounts](#cfn-lightsail-bucket-readonlyaccessaccounts): 
    - String
  [ResourcesReceivingAccess](#cfn-lightsail-bucket-resourcesreceivingaccess): 
    - String
  [Tags](#cfn-lightsail-bucket-tags): 
    - Tag
```

## Properties
<a name="aws-resource-lightsail-bucket-properties"></a>

`AccessRules`  <a name="cfn-lightsail-bucket-accessrules"></a>
An object that describes the access rules for the bucket.  
*Required*: No  
*Type*: [AccessRules](aws-properties-lightsail-bucket-accessrules.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BucketName`  <a name="cfn-lightsail-bucket-bucketname"></a>
The name of the bucket.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-z0-9][a-z0-9-]{1,52}[a-z0-9]$`  
*Minimum*: `3`  
*Maximum*: `54`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`BundleId`  <a name="cfn-lightsail-bucket-bundleid"></a>
The bundle ID for the bucket (for example, `small_1_0`).  
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.  
*Required*: Yes  
*Type*: String  
*Pattern*: `.*\S.*`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ObjectVersioning`  <a name="cfn-lightsail-bucket-objectversioning"></a>
Indicates whether object versioning is enabled for the bucket.  
The following options can be configured:  
+ `Enabled` - Object versioning is enabled.
+ `Suspended` - Object versioning was previously enabled but is currently suspended. Existing object versions are retained.
+ `NeverEnabled` - Object versioning has never been enabled.
*Required*: No  
*Type*: Boolean  
*Pattern*: `.*\S.*`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ReadOnlyAccessAccounts`  <a name="cfn-lightsail-bucket-readonlyaccessaccounts"></a>
An array of AWS account IDs that have read-only access to the bucket.  
*Required*: No  
*Type*: Array of String  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResourcesReceivingAccess`  <a name="cfn-lightsail-bucket-resourcesreceivingaccess"></a>
An array of Lightsail instances that have access to the bucket.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-lightsail-bucket-tags"></a>
An array of key-value pairs to apply to this resource.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *AWS CloudFormation User Guide*.  
The `Value` of `Tags` is optional for Lightsail resources.
*Required*: No  
*Type*: Array of [Tag](aws-properties-lightsail-bucket-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-lightsail-bucket-return-values"></a>

### Ref
<a name="aws-resource-lightsail-bucket-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns a unique identifier for this resource.

### Fn::GetAtt
<a name="aws-resource-lightsail-bucket-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lightsail-bucket-return-values-fn--getatt-fn--getatt"></a>

`AbleToUpdateBundle`  <a name="AbleToUpdateBundle-fn::getatt"></a>
A Boolean value indicating whether the bundle that is currently applied to your distribution can be changed to another bundle.

`BucketArn`  <a name="BucketArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the bucket.

`Url`  <a name="Url-fn::getatt"></a>
The URL of the bucket.

# AWS::Lightsail::Bucket AccessRules
<a name="aws-properties-lightsail-bucket-accessrules"></a>

`AccessRules` is a property of the [AWS::Lightsail::Bucket](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-bucket.html) resource. It describes access rules for a bucket.

## Syntax
<a name="aws-properties-lightsail-bucket-accessrules-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-bucket-accessrules-syntax.json"></a>

```
{
  "[AllowPublicOverrides](#cfn-lightsail-bucket-accessrules-allowpublicoverrides)" : Boolean,
  "[GetObject](#cfn-lightsail-bucket-accessrules-getobject)" : String
}
```

### YAML
<a name="aws-properties-lightsail-bucket-accessrules-syntax.yaml"></a>

```
  [AllowPublicOverrides](#cfn-lightsail-bucket-accessrules-allowpublicoverrides): Boolean
  [GetObject](#cfn-lightsail-bucket-accessrules-getobject): String
```

## Properties
<a name="aws-properties-lightsail-bucket-accessrules-properties"></a>

`AllowPublicOverrides`  <a name="cfn-lightsail-bucket-accessrules-allowpublicoverrides"></a>
A Boolean value indicating whether the access control list (ACL) permissions that are applied to individual objects override the `GetObject` option that is currently specified.  
When this is true, you can use the [PutObjectAcl](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectAcl.html) Amazon S3 API operation to set individual objects to public (read-only) or private, using either the `public-read` ACL or the `private` ACL.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`GetObject`  <a name="cfn-lightsail-bucket-accessrules-getobject"></a>
Specifies the anonymous access to all objects in a bucket.  
The following options can be specified:  
+ `public` - Sets all objects in the bucket to public (read-only), making them readable by everyone on the internet.

  If the `GetObject` value is set to `public`, then all objects in the bucket default to public regardless of the `allowPublicOverrides` value.
+ `private` - Sets all objects in the bucket to private, making them readable only by you and anyone that you grant access to.

  If the `GetObject` value is set to `private`, and the `allowPublicOverrides` value is set to `true`, then all objects in the bucket default to private unless they are configured with a `public-read` ACL. Individual objects with a `public-read` ACL are readable by everyone on the internet.
*Required*: No  
*Type*: String  
*Allowed values*: `public | private`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Bucket Tag
<a name="aws-properties-lightsail-bucket-tag"></a>

Describes a tag key and optional value assigned to an Amazon Lightsail resource.

For more information about tags in Lightsail, see the [Amazon Lightsail Developer Guide](https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags).

## Syntax
<a name="aws-properties-lightsail-bucket-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-lightsail-bucket-tag-syntax.json"></a>

```
{
  "[Key](#cfn-lightsail-bucket-tag-key)" : String,
  "[Value](#cfn-lightsail-bucket-tag-value)" : String
}
```

### YAML
<a name="aws-properties-lightsail-bucket-tag-syntax.yaml"></a>

```
  [Key](#cfn-lightsail-bucket-tag-key): String
  [Value](#cfn-lightsail-bucket-tag-value): String
```

## Properties
<a name="aws-properties-lightsail-bucket-tag-properties"></a>

`Key`  <a name="cfn-lightsail-bucket-tag-key"></a>
The key of the tag.  
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: \$1 - = . \$1 : / @  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-lightsail-bucket-tag-value"></a>
The value of the tag.  
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: \$1 - = . \$1 : / @  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)