S3Bucket
A resource of the AWS provider, version 0.3.0, in its Storage group. Import it with:
import S3Bucket from "aws/storage"Example
resource S3Bucket example {
bucket = "example-value"
acl = "private"
versioning = false
region = "example-value"
serverSideEncryption = "AES256"
kmsKeyId = "example-value"
blockPublicAccess = true
websiteIndexDocument = "example-value"
websiteErrorDocument = "example-value"
websiteRedirectAllRequestsTo = "example-value"
corsRules = "..."
lifecycleRules = "..."
logging = "..."
tags = "..."
}Properties
Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
bucket | string | — | No | Bucket name (globally unique, DNS-compliant) |
acl | string | "private" | No | Canned ACL for the bucket Allowed: "private", "public-read", "public-read-write", "authenticated-read" |
versioning | boolean | false | No | Enable versioning for the bucket |
region | string | — | No | AWS region for the bucket |
serverSideEncryption | string | — | No | Server-side encryption algorithm Allowed: "AES256", "aws:kms" |
kmsKeyId | string | — | No | KMS key ID for encryption (when using aws:kms) |
blockPublicAccess | boolean | true | No | Block all public access |
websiteIndexDocument | string | — | No | Index document for static website hosting |
websiteErrorDocument | string | — | No | Error document for static website hosting |
websiteRedirectAllRequestsTo | string | — | No | Redirect all requests to another host |
corsRules | any[] | — | No | CORS configuration rules |
lifecycleRules | any[] | — | No | Lifecycle rules for object management |
logging | any | — | No | Access logging configuration |
tags | object | — | No | Tags to apply to the bucket |
Set by AWS after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.
| Name | Type | Importable | Description |
|---|---|---|---|
arn | string | Yes | The ARN of the bucket |
domainName | string | No | The domain name of the bucket |
regionalDomainName | string | No | The regional domain name of the bucket |
websiteEndpoint | string | No | Website endpoint (if hosting enabled) |
creationDate | string | No | The creation date of the bucket |