This documentation is for the developer preview release of the AWS CDK. Do not use this version of the AWS CDK in production. Subsequent releases of the AWS CDK will likely include breaking changes.

@aws-cdk/aws-s3

AWS S3 Construct Library

Define an unencrypted S3 bucket.

new Bucket(this, 'MyFirstBucket');

Bucket constructs expose the following deploy-time attributes:

  • bucketArn - the ARN of the bucket (i.e. arn:aws:s3:::bucket_name)
  • bucketName - the name of the bucket (i.e. bucket_name)
  • bucketUrl - the URL of the bucket (i.e. https://s3.us-west-1.amazonaws.com/onlybucket)
  • arnForObjects(...pattern) - the ARN of an object or objects within the bucket (i.e. arn:aws:s3:::my_corporate_bucket/exampleobject.png or arn:aws:s3:::my_corporate_bucket/Development/*)
  • urlForObject(key) - the URL of an object within the bucket (i.e. https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey)

Encryption

Define a KMS-encrypted bucket:

const bucket = new Bucket(this, 'MyUnencryptedBucket', {
    encryption: BucketEncryption.Kms
});

// you can access the encryption key:
assert(bucket.encryptionKey instanceof kms.EncryptionKey);

You can also supply your own key:

const myKmsKey = new kms.EncryptionKey(this, 'MyKey');

const bucket = new Bucket(this, 'MyEncryptedBucket', {
    encryption: BucketEncryption.Kms,
    encryptionKey: myKmsKey
});

assert(bucket.encryptionKey === myKmsKey);

Use BucketEncryption.ManagedKms to use the S3 master KMS key:

const bucket = new Bucket(this, 'Buck', {
    encryption: BucketEncryption.ManagedKms
});

assert(bucket.encryptionKey == null);

Permissions

A bucket policy will be automatically created for the bucket upon the first call to addToResourcePolicy(statement):

const bucket = new Bucket(this, 'MyBucket');
bucket.addToResourcePolicy(new iam.PolicyStatement()
    .addActions('s3:GetObject')
    .addAllResources());

Most of the time, you won’t have to manipulate the bucket policy directly. Instead, buckets have “grant” methods called to give prepackaged sets of permissions to other resources. For example:

const lambda = new lambda.Function(this, 'Lambda', { /* ... */ });

const bucket = new Bucket(this, 'MyBucket');
bucket.grantReadWrite(lambda.role);

Will give the Lambda’s execution role permissions to read and write from the bucket.

Buckets as sources in CodePipeline

This package also defines an Action that allows you to use a Bucket as a source in CodePipeline:

import codepipeline = require('@aws-cdk/aws-codepipeline');
import s3 = require('@aws-cdk/aws-s3');

const sourceBucket = new s3.Bucket(this, 'MyBucket', {
    versioned: true, // a Bucket used as a source in CodePipeline must be versioned
});

const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
const sourceStage = pipeline.addStage('Source');
const sourceAction = new s3.PipelineSourceAction(this, 'S3Source', {
    stage: sourceStage,
    bucket: sourceBucket,
    bucketKey: 'path/to/file.zip',
});

You can also add the Bucket to the Pipeline directly:

// equivalent to the code above:
const sourceAction = sourceBucket.addToPipeline(sourceStage, 'S3Source', {
    bucketKey: 'path/to/file.zip',
});

By default, the Pipeline will poll the Bucket to detect changes. You can change that behavior to use CloudWatch Events by setting the pollForSourceChanges property to false (it’s true by default). If you do that, make sure the source Bucket is part of an AWS CloudTrail Trail - otherwise, the CloudWatch Events will not be emitted, and your Pipeline will not react to changes in the Bucket. You can do it through the CDK:

import cloudtrail = require('@aws-cdk/aws-cloudtrail');

const key = 'some/key.zip';
const trail = new cloudtrail.CloudTrail(this, 'CloudTrail');
trail.addS3EventSelector([sourceBucket.arnForObjects(key)], cloudtrail.ReadWriteType.WriteOnly);
const sourceAction = sourceBucket.addToPipeline(sourceStage, 'S3Source', {
  bucketKey: key,
  pollForSourceChanges: false, // default: true
});

Buckets as deploy targets in CodePipeline

This package also defines an Action that allows you to use a Bucket as a deployment target in CodePipeline:

import codepipeline = require('@aws-cdk/aws-codepipeline');
import s3 = require('@aws-cdk/aws-s3');

const targetBucket = new s3.Bucket(this, 'MyBucket', {});

const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
const deployStage = pipeline.addStage('Deploy');
const deployAction = new s3.PipelineDeployAction(this, 'S3Deploy', {
    stage: deployStage,
    bucket: targetBucket,
    inputArtifact: sourceAction.outputArtifact,
});

Sharing buckets between stacks

To use a bucket in a different stack in the same CDK application, pass the object to the other stack:

/**
 * Stack that defines the bucket
 */
class Producer extends cdk.Stack {
    public readonly myBucket: s3.Bucket;

    constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
        super(scope, id, props);

        const bucket = new s3.Bucket(this, 'MyBucket', {
          removalPolicy: cdk.RemovalPolicy.Destroy
        });
        this.myBucket = bucket;
    }
}

interface ConsumerProps extends cdk.StackProps {
    userBucket: s3.IBucket;
}

/**
 * Stack that consumes the bucket
 */
class Consumer extends cdk.Stack {
    constructor(scope: cdk.App, id: string, props: ConsumerProps) {
        super(scope, id, props);

        const user = new iam.User(this, 'MyUser');
        props.userBucket.grantReadWrite(user);
    }
}

const producer = new Producer(app, 'ProducerStack');
new Consumer(app, 'ConsumerStack', { userBucket: producer.myBucket });

Importing existing buckets

To import an existing bucket into your CDK application, use the Bucket.import factory method. This method accepts a BucketImportProps which describes the properties of the already existing bucket:

const bucket = Bucket.import(this, {
    bucketArn: 'arn:aws:s3:::my-bucket'
});

// now you can just call methods on the bucket
bucket.grantReadWrite(user);

Bucket Notifications

The Amazon S3 notification feature enables you to receive notifications when certain events happen in your bucket as described under S3 Bucket Notifications of the S3 Developer Guide.

To subscribe for bucket notifications, use the bucket.onEvent method. The bucket.onObjectCreated and bucket.onObjectRemoved can also be used for these common use cases.

The following example will subscribe an SNS topic to be notified of all `s3:ObjectCreated:* events:

const myTopic = new sns.Topic(this, 'MyTopic');
bucket.onEvent(s3.EventType.ObjectCreated, myTopic);

This call will also ensure that the topic policy can accept notifications for this specific bucket.

The following destinations are currently supported:

  • sns.Topic
  • sqs.Queue
  • lambda.Function

It is also possible to specify S3 object key filters when subscribing. The following example will notify myQueue when objects prefixed with foo/ and have the .jpg suffix are removed from the bucket.

bucket.onEvent(s3.EventType.ObjectRemoved, myQueue, { prefix: 'foo/', suffix: '.jpg' });

Block Public Access

Use blockPublicAccess to specify block public access settings on the bucket.

Enable all block public access settings:

const bucket = new Bucket(this, 'MyBlockedBucket', {
    blockPublicAccess: BlockPublicAccess.BlockAll
});

Block and ignore public ACLs:

const bucket = new Bucket(this, 'MyBlockedBucket', {
    blockPublicAccess: BlockPublicAccess.BlockAcls
});

Alternatively, specify the settings manually:

const bucket = new Bucket(this, 'MyBlockedBucket', {
    blockPublicAccess: new BlockPublicAccess({ blockPublicPolicy: true })
});

When blockPublicPolicy is set to true, grantPublicRead() throws an error.

Reference

View in Nuget

csproj:

<PackageReference Include="Amazon.CDK.AWS.S3" Version="0.24.1" />

dotnet:

dotnet add package Amazon.CDK.AWS.S3 --version 0.24.1

packages.config:

<package id="Amazon.CDK.AWS.S3" version="0.24.1" />

View in Maven Central

Apache Buildr:

'software.amazon.awscdk:s3:jar:0.24.1'

Apache Ivy:

<dependency groupId="software.amazon.awscdk" name="s3" rev="0.24.1"/>

Apache Maven:

<dependency>
  <groupId>software.amazon.awscdk</groupId>
  <artifactId>s3</artifactId>
  <version>0.24.1</version>
</dependency>

Gradle / Grails:

compile 'software.amazon.awscdk:s3:0.24.1'

Groovy Grape:

@Grapes(
@Grab(group='software.amazon.awscdk', module='s3', version='0.24.1')
)

View in NPM

npm:

$ npm i @aws-cdk/aws-s3@0.24.1

package.json:

{
  "@aws-cdk/aws-s3": "^0.24.1"
}

yarn:

$ yarn add @aws-cdk/aws-s3@0.24.1

View in NPM

npm:

$ npm i @aws-cdk/aws-s3@0.24.1

package.json:

{
  "@aws-cdk/aws-s3": "^0.24.1"
}

yarn:

$ yarn add @aws-cdk/aws-s3@0.24.1

BlockPublicAccess

class @aws-cdk/aws-s3.BlockPublicAccess(options)

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.BlockPublicAccess;
const { BlockPublicAccess } = require('@aws-cdk/aws-s3');
import { BlockPublicAccess } from '@aws-cdk/aws-s3';
Parameters:options (BlockPublicAccessOptions) –
BlockAcls
Type:BlockPublicAccess (readonly) (static)
BlockAll
Type:BlockPublicAccess (readonly) (static)
blockPublicAcls
Type:boolean (optional)
blockPublicPolicy
Type:boolean (optional)
ignorePublicAcls
Type:boolean (optional)
restrictPublicBuckets
Type:boolean (optional)

BlockPublicAccessOptions (interface)

class @aws-cdk/aws-s3.BlockPublicAccessOptions

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.BlockPublicAccessOptions;
// BlockPublicAccessOptions is an interface
import { BlockPublicAccessOptions } from '@aws-cdk/aws-s3';
blockPublicAcls

Whether to block public ACLs

Type:boolean (optional)
blockPublicPolicy

Whether to block public policy

Type:boolean (optional)
ignorePublicAcls

Whether to ignore public ACLs

Type:boolean (optional)
restrictPublicBuckets

Whether to restrict public access

Type:boolean (optional)

Bucket

class @aws-cdk/aws-s3.Bucket(scope, id[, props])

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.Bucket;
const { Bucket } = require('@aws-cdk/aws-s3');
import { Bucket } from '@aws-cdk/aws-s3';

An S3 bucket with associated policy objects

This bucket does not yet have all features that exposed by the underlying

BucketResource.

Extends:

BucketBase

Parameters:
static import(scope, id, props) → @aws-cdk/aws-s3.IBucket

Creates a Bucket construct that represents an external bucket.

Parameters:
  • scope (@aws-cdk/cdk.Construct) –
  • id (string) – The construct’s name.
  • props (BucketImportProps) – A BucketAttributes object. Can be obtained from a call to bucket.export() or manually created.
Return type:

IBucket

addLifecycleRule(rule)

Add a lifecycle rule to the bucket

Parameters:rule (LifecycleRule) – The rule to add
export() → @aws-cdk/aws-s3.BucketImportProps

Implements @aws-cdk/aws-s3.BucketBase.export()

Exports this bucket from the stack.

Return type:BucketImportProps
onEvent(event, dest, *filters)

Adds a bucket notification event destination.

Parameters:
  • event (EventType) – The event to trigger the notification
  • dest (@aws-cdk/aws-s3-notifications.IBucketNotificationDestination) – The notification destination (Lambda, SNS Topic or SQS Queue)
  • *filters (NotificationKeyFilter) – S3 object key filter rules to determine which objects trigger this event. Each filter must include a prefix and/or suffix that will be matched against the s3 object key. Refer to the S3 Developer Guide for details about allowed filter rules.
onObjectCreated(dest, *filters)

Subscribes a destination to receive notificatins when an object is

created in the bucket. This is identical to calling

onEvent(EventType.ObjectCreated).

Parameters:
onObjectRemoved(dest, *filters)

Subscribes a destination to receive notificatins when an object is

removed from the bucket. This is identical to calling

onEvent(EventType.ObjectRemoved).

Parameters:
bucketArn

Implements @aws-cdk/aws-s3.BucketBase.bucketArn()

The ARN of the bucket.

Type:string (readonly)
bucketName

Implements @aws-cdk/aws-s3.BucketBase.bucketName()

The name of the bucket.

Type:string (readonly)
bucketWebsiteUrl
Type:string (readonly)
domainName

Implements @aws-cdk/aws-s3.BucketBase.domainName()

The domain of the bucket.

Type:string (readonly)
dualstackDomainName
Type:string (readonly)
encryptionKey

Implements @aws-cdk/aws-s3.BucketBase.encryptionKey()

Optional KMS encryption key associated with this bucket.

Type:@aws-cdk/aws-kms.IEncryptionKey (optional) (readonly)
autoCreatePolicy

Implements @aws-cdk/aws-s3.BucketBase.autoCreatePolicy()

Indicates if a bucket resource policy should automatically created upon

the first call to addToResourcePolicy.

Protected property

Type:boolean
disallowPublicAccess

Implements @aws-cdk/aws-s3.BucketBase.disallowPublicAccess()

Whether to disallow public access

Protected property

Type:boolean (optional)
policy

Implements @aws-cdk/aws-s3.BucketBase.policy()

The resource policy assoicated with this bucket.

If autoCreatePolicy is true, a BucketPolicy will be created upon the

first call to addToResourcePolicy(s).

Type:BucketPolicy (optional)
addToPipeline(stage, name, props) → @aws-cdk/aws-s3.PipelineSourceAction

Inherited from @aws-cdk/aws-s3.BucketBase

Convenience method for creating a new {@link PipelineSourceAction},

and adding it to the given Stage.

Parameters:
Returns:

the newly created {@link PipelineSourceAction}

Return type:

PipelineSourceAction

addToPipelineAsDeploy(stage, name[, props]) → @aws-cdk/aws-s3.PipelineDeployAction

Inherited from @aws-cdk/aws-s3.BucketBase

Convenience method for creating a new {@link PipelineDeployAction},

and adding it to the given Stage.

Parameters:
Return type:

PipelineDeployAction

addToResourcePolicy(permission)

Inherited from @aws-cdk/aws-s3.BucketBase

Adds a statement to the resource policy for a principal (i.e.

account/role/service) to perform actions on this bucket and/or it’s

contents. Use bucketArn and arnForObjects(keys) to obtain ARNs for

this bucket or objects.

Parameters:permission (@aws-cdk/aws-iam.PolicyStatement) –
arnForObjects(*keyPattern) → string

Inherited from @aws-cdk/aws-s3.BucketBase

Returns an ARN that represents all objects within the bucket that match

the key pattern specified. To represent all keys, specify "*".

If you specify multiple components for keyPattern, they will be concatenated:

arnForObjects('home/', team, '/', user, '/*')
Parameters:*keyPattern (string) –
Return type:string
grantDelete([identity[, objectsKeyPattern]])

Inherited from @aws-cdk/aws-s3.BucketBase

Grants s3:DeleteObject* permission to an IAM pricipal for objects

in this bucket.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
grantPublicAccess(keyPrefix, *allowedActions) → @aws-cdk/aws-iam.PolicyStatement

Inherited from @aws-cdk/aws-s3.BucketBase

Allows unrestricted access to objects from this bucket.

IMPORTANT: This permission allows anyone to perform actions on S3 objects

in this bucket, which is useful for when you configure your bucket as a

website and want everyone to be able to read objects in the bucket without

needing to authenticate.

Without arguments, this method will grant read (“s3:GetObject”) access to

all objects (“*”) in the bucket.

The method returns the iam.PolicyStatement object, which can then be modified

as needed. For example, you can add a condition that will restrict access only

to an IPv4 range like this:

const statement = bucket.grantPublicAccess();

statement.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” });

Parameters:
  • keyPrefix (string (optional)) – the prefix of S3 object keys (e.g. home/*). Default is “*”.
  • *allowedActions (string) – the set of S3 actions to allow. Default is “s3:GetObject”.
Returns:

The iam.PolicyStatement object, which can be used to apply e.g. conditions.

Return type:

@aws-cdk/aws-iam.PolicyStatement

grantPut([identity[, objectsKeyPattern]])

Inherited from @aws-cdk/aws-s3.BucketBase

Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.

If encryption is used, permission to use the key to encrypt the contents

of written files will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
grantRead([identity[, objectsKeyPattern]])

Inherited from @aws-cdk/aws-s3.BucketBase

Grant read permissions for this bucket and it’s contents to an IAM

principal (Role/Group/User).

If encryption is used, permission to use the key to decrypt the contents

of the bucket will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
grantReadWrite([identity[, objectsKeyPattern]])

Inherited from @aws-cdk/aws-s3.BucketBase

Grants read/write permissions for this bucket and it’s contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to use the key for

encrypt/decrypt will also be granted.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
grantWrite([identity[, objectsKeyPattern]])

Inherited from @aws-cdk/aws-s3.BucketBase

Grant write permissions to this bucket to an IAM principal.

If encryption is used, permission to use the key to encrypt the contents

of written files will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
onPutObject(name[, target[, path]]) → @aws-cdk/aws-events.EventRule

Inherited from @aws-cdk/aws-s3.BucketBase

Defines a CloudWatch Event Rule that triggers upon putting an object into the Bucket.

Parameters:
Return type:

@aws-cdk/aws-events.EventRule

urlForObject([key]) → string

Inherited from @aws-cdk/aws-s3.BucketBase

The https URL of an S3 object. For example:

Parameters:key (string (optional)) – The S3 key of the object. If not specified, the URL of the bucket is returned.
Returns:an ObjectS3Url token
Return type:string
bucketUrl

Inherited from @aws-cdk/aws-s3.BucketBase

The https:// URL of this bucket.

Type:string (readonly)
apply(aspect)

Inherited from @aws-cdk/cdk.Construct

Applies the aspect to this Constructs node

Parameters:aspect (@aws-cdk/cdk.IAspect) –
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

BucketBase

class @aws-cdk/aws-s3.BucketBase(scope, id)

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.BucketBase;
const { BucketBase } = require('@aws-cdk/aws-s3');
import { BucketBase } from '@aws-cdk/aws-s3';

Represents an S3 Bucket.

Buckets can be either defined within this stack:

new Bucket(this, ‘MyBucket’, { props });

Or imported from an existing bucket:

Bucket.import(this, ‘MyImportedBucket’, { bucketArn: … });

You can also export a bucket and import it into another stack:

const ref = myBucket.export();

Bucket.import(this, ‘MyImportedBucket’, ref);

Extends:

@aws-cdk/cdk.Construct

Implements:

IBucket

Abstract:

Yes

Parameters:
  • scope (@aws-cdk/cdk.Construct) – The scope in which to define this construct
  • id (string) – The scoped construct ID. Must be unique amongst siblings. If the ID includes a path separator (/), then it will be replaced by double dash .
addToPipeline(stage, name, props) → @aws-cdk/aws-s3.PipelineSourceAction

Implements @aws-cdk/aws-s3.IBucket.addToPipeline()

Convenience method for creating a new {@link PipelineSourceAction},

and adding it to the given Stage.

Parameters:
Returns:

the newly created {@link PipelineSourceAction}

Return type:

PipelineSourceAction

addToPipelineAsDeploy(stage, name[, props]) → @aws-cdk/aws-s3.PipelineDeployAction

Implements @aws-cdk/aws-s3.IBucket.addToPipelineAsDeploy()

Convenience method for creating a new {@link PipelineDeployAction},

and adding it to the given Stage.

Parameters:
Return type:

PipelineDeployAction

addToResourcePolicy(permission)

Implements @aws-cdk/aws-s3.IBucket.addToResourcePolicy()

Adds a statement to the resource policy for a principal (i.e.

account/role/service) to perform actions on this bucket and/or it’s

contents. Use bucketArn and arnForObjects(keys) to obtain ARNs for

this bucket or objects.

Parameters:permission (@aws-cdk/aws-iam.PolicyStatement) –
arnForObjects(*keyPattern) → string

Implements @aws-cdk/aws-s3.IBucket.arnForObjects()

Returns an ARN that represents all objects within the bucket that match

the key pattern specified. To represent all keys, specify "*".

If you specify multiple components for keyPattern, they will be concatenated:

arnForObjects('home/', team, '/', user, '/*')
Parameters:*keyPattern (string) –
Return type:string
export() → @aws-cdk/aws-s3.BucketImportProps

Implements @aws-cdk/aws-s3.IBucket.export()

Exports this bucket from the stack.

Return type:BucketImportProps
Abstract:Yes
grantDelete([identity[, objectsKeyPattern]])

Implements @aws-cdk/aws-s3.IBucket.grantDelete()

Grants s3:DeleteObject* permission to an IAM pricipal for objects

in this bucket.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
grantPublicAccess(keyPrefix, *allowedActions) → @aws-cdk/aws-iam.PolicyStatement

Implements @aws-cdk/aws-s3.IBucket.grantPublicAccess()

Allows unrestricted access to objects from this bucket.

IMPORTANT: This permission allows anyone to perform actions on S3 objects

in this bucket, which is useful for when you configure your bucket as a

website and want everyone to be able to read objects in the bucket without

needing to authenticate.

Without arguments, this method will grant read (“s3:GetObject”) access to

all objects (“*”) in the bucket.

The method returns the iam.PolicyStatement object, which can then be modified

as needed. For example, you can add a condition that will restrict access only

to an IPv4 range like this:

const statement = bucket.grantPublicAccess();

statement.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” });

Parameters:
  • keyPrefix (string (optional)) – the prefix of S3 object keys (e.g. home/*). Default is “*”.
  • *allowedActions (string) – the set of S3 actions to allow. Default is “s3:GetObject”.
Returns:

The iam.PolicyStatement object, which can be used to apply e.g. conditions.

Return type:

@aws-cdk/aws-iam.PolicyStatement

grantPut([identity[, objectsKeyPattern]])

Implements @aws-cdk/aws-s3.IBucket.grantPut()

Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.

If encryption is used, permission to use the key to encrypt the contents

of written files will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
grantRead([identity[, objectsKeyPattern]])

Implements @aws-cdk/aws-s3.IBucket.grantRead()

Grant read permissions for this bucket and it’s contents to an IAM

principal (Role/Group/User).

If encryption is used, permission to use the key to decrypt the contents

of the bucket will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
grantReadWrite([identity[, objectsKeyPattern]])

Implements @aws-cdk/aws-s3.IBucket.grantReadWrite()

Grants read/write permissions for this bucket and it’s contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to use the key for

encrypt/decrypt will also be granted.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
grantWrite([identity[, objectsKeyPattern]])

Implements @aws-cdk/aws-s3.IBucket.grantWrite()

Grant write permissions to this bucket to an IAM principal.

If encryption is used, permission to use the key to encrypt the contents

of written files will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
onPutObject(name[, target[, path]]) → @aws-cdk/aws-events.EventRule

Implements @aws-cdk/aws-s3.IBucket.onPutObject()

Defines a CloudWatch Event Rule that triggers upon putting an object into the Bucket.

Parameters:
Return type:

@aws-cdk/aws-events.EventRule

urlForObject([key]) → string

Implements @aws-cdk/aws-s3.IBucket.urlForObject()

The https URL of an S3 object. For example:

Parameters:key (string (optional)) – The S3 key of the object. If not specified, the URL of the bucket is returned.
Returns:an ObjectS3Url token
Return type:string
bucketArn

Implements @aws-cdk/aws-s3.IBucket.bucketArn()

The ARN of the bucket.

Type:string (readonly) (abstract)
bucketName

Implements @aws-cdk/aws-s3.IBucket.bucketName()

The name of the bucket.

Type:string (readonly) (abstract)
bucketUrl

Implements @aws-cdk/aws-s3.IBucket.bucketUrl()

The https:// URL of this bucket.

Type:string (readonly)
domainName

Implements @aws-cdk/aws-s3.IBucket.domainName()

The domain of the bucket.

Type:string (readonly) (abstract)
encryptionKey

Implements @aws-cdk/aws-s3.IBucket.encryptionKey()

Optional KMS encryption key associated with this bucket.

Type:@aws-cdk/aws-kms.IEncryptionKey (optional) (readonly) (abstract)
autoCreatePolicy

Indicates if a bucket resource policy should automatically created upon

the first call to addToResourcePolicy.

Protected property

Type:boolean (abstract)
disallowPublicAccess

Whether to disallow public access

Protected property

Type:boolean (optional) (abstract)
policy

Implements @aws-cdk/aws-s3.IBucket.policy()

The resource policy assoicated with this bucket.

If autoCreatePolicy is true, a BucketPolicy will be created upon the

first call to addToResourcePolicy(s).

Type:BucketPolicy (optional) (abstract)
apply(aspect)

Inherited from @aws-cdk/cdk.Construct

Applies the aspect to this Constructs node

Parameters:aspect (@aws-cdk/cdk.IAspect) –
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

BucketEncryption (enum)

class @aws-cdk/aws-s3.BucketEncryption

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.BucketEncryption;
const { BucketEncryption } = require('@aws-cdk/aws-s3');
import { BucketEncryption } from '@aws-cdk/aws-s3';

What kind of server-side encryption to apply to this bucket

Unencrypted

Objects in the bucket are not encrypted.

KmsManaged

Server-side KMS encryption with a master key managed by KMS.

S3Managed

Server-side encryption with a master key managed by S3.

Kms

Server-side encryption with a KMS key managed by the user.

If encryptionKey is specified, this key will be used, otherwise, one will be defined.

BucketImportProps (interface)

class @aws-cdk/aws-s3.BucketImportProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.BucketImportProps;
// BucketImportProps is an interface
import { BucketImportProps } from '@aws-cdk/aws-s3';

A reference to a bucket. The easiest way to instantiate is to call

bucket.export(). Then, the consumer can use Bucket.import(this, ref) and

get a Bucket.

bucketArn

The ARN of the bucket. At least one of bucketArn or bucketName must be

defined in order to initialize a bucket ref.

Type:string (optional)
bucketDomainName

The domain name of the bucket.

Type:string (optional)
Default:Inferred from bucket name
bucketName

The name of the bucket. If the underlying value of ARN is a string, the

name will be parsed from the ARN. Otherwise, the name is optional, but

some features that require the bucket name such as auto-creating a bucket

policy, won’t work.

Type:string (optional)
bucketWebsiteNewUrlFormat

The format of the website URL of the bucket. This should be true for

regions launched since 2014.

Type:boolean (optional)
Default:false
bucketWebsiteUrl

The website URL of the bucket (if static web hosting is enabled).

Type:string (optional)
Default:Inferred from bucket name

BucketPolicy

class @aws-cdk/aws-s3.BucketPolicy(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.BucketPolicy;
const { BucketPolicy } = require('@aws-cdk/aws-s3');
import { BucketPolicy } from '@aws-cdk/aws-s3';

Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

Extends:

@aws-cdk/cdk.Construct

Parameters:
document

A policy document containing permissions to add to the specified bucket.

For more information, see Access Policy Language Overview in the Amazon

Simple Storage Service Developer Guide.

Type:@aws-cdk/aws-iam.PolicyDocument (readonly)
apply(aspect)

Inherited from @aws-cdk/cdk.Construct

Applies the aspect to this Constructs node

Parameters:aspect (@aws-cdk/cdk.IAspect) –
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

BucketPolicyProps (interface)

class @aws-cdk/aws-s3.BucketPolicyProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.BucketPolicyProps;
// BucketPolicyProps is an interface
import { BucketPolicyProps } from '@aws-cdk/aws-s3';
bucket

The Amazon S3 bucket that the policy applies to.

Type:IBucket

BucketProps (interface)

class @aws-cdk/aws-s3.BucketProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.BucketProps;
// BucketProps is an interface
import { BucketProps } from '@aws-cdk/aws-s3';
blockPublicAccess

The block public access configuration of this bucket.

Type:BlockPublicAccess (optional)
bucketName

Physical name of this bucket.

Type:string (optional)
Default:Assigned by CloudFormation (recommended)
encryption

The kind of server-side encryption to apply to this bucket.

If you choose KMS, you can specify a KMS key via encryptionKey. If

encryption key is not specified, a key will automatically be created.

Type:BucketEncryption (optional)
Default:Unencrypted
encryptionKey

External KMS key to use for bucket encryption.

The ‘encryption’ property must be either not specified or set to “Kms”.

An error will be emitted if encryption is set to “Unencrypted” or

“Managed”.

Type:@aws-cdk/aws-kms.IEncryptionKey (optional)
Default:If encryption is set to “Kms” and this property is undefined, a

new KMS key will be created and associated with this bucket.

@aws-cdk/aws-s3.lifecycleRules

Rules that define how Amazon S3 manages objects during their lifetime.

Type:LifecycleRule[] (optional)
Default:No lifecycle rules
@aws-cdk/aws-s3.publicReadAccess

Grants public read access to all objects in the bucket.

Similar to calling bucket.grantPublicAccess()

Type:boolean (optional)
@aws-cdk/aws-s3.removalPolicy

Policy to apply when the bucket is removed from this stack.

Type:@aws-cdk/cdk.RemovalPolicy (optional)
Default:The bucket will be orphaned
@aws-cdk/aws-s3.versioned

Whether this bucket should have versioning turned on or not.

Type:boolean (optional)
Default:false
@aws-cdk/aws-s3.websiteErrorDocument

The name of the error document (e.g. “404.html”) for the website.

websiteIndexDocument must also be set if this is set.

Type:string (optional)
@aws-cdk/aws-s3.websiteIndexDocument

The name of the index document (e.g. “index.html”) for the website. Enables static website

hosting for this bucket.

Type:string (optional)

CfnBucket

class @aws-cdk/aws-s3.CfnBucket(scope, id[, props])

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket;
const { CfnBucket } = require('@aws-cdk/aws-s3');
import { CfnBucket } from '@aws-cdk/aws-s3';
Extends:

@aws-cdk/cdk.Resource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.Resource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
bucketArn
Type:string (readonly)
bucketDomainName
Type:string (readonly)
bucketDualStackDomainName
Type:string (readonly)
bucketName
Type:string (readonly)
bucketRegionalDomainName
Type:string (readonly)
bucketWebsiteUrl
Type:string (readonly)
propertyOverrides
Type:CfnBucketProps (readonly)
tags

The TagManager handles setting, removing and formatting tags

Tags should be managed either passing them as properties during

initiation or by calling methods on this object. If both techniques are

used only the tags from the TagManager will be used. Tag (aspect)

will use the manager.

Type:@aws-cdk/cdk.TagManager (readonly)
class AbortIncompleteMultipartUploadProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.AbortIncompleteMultipartUploadProperty;
// CfnBucket.AbortIncompleteMultipartUploadProperty is an interface
import { CfnBucket.AbortIncompleteMultipartUploadProperty } from '@aws-cdk/aws-s3';
daysAfterInitiation

CfnBucket.AbortIncompleteMultipartUploadProperty.DaysAfterInitiation

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-abortincompletemultipartupload.html#cfn-s3-bucket-abortincompletemultipartupload-daysafterinitiation

Type:number or @aws-cdk/cdk.Token
class AccelerateConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.AccelerateConfigurationProperty;
// CfnBucket.AccelerateConfigurationProperty is an interface
import { CfnBucket.AccelerateConfigurationProperty } from '@aws-cdk/aws-s3';
accelerationStatus

CfnBucket.AccelerateConfigurationProperty.AccelerationStatus

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accelerateconfiguration.html#cfn-s3-bucket-accelerateconfiguration-accelerationstatus

Type:string
class AccessControlTranslationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.AccessControlTranslationProperty;
// CfnBucket.AccessControlTranslationProperty is an interface
import { CfnBucket.AccessControlTranslationProperty } from '@aws-cdk/aws-s3';
owner

CfnBucket.AccessControlTranslationProperty.Owner

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-accesscontroltranslation.html#cfn-s3-bucket-accesscontroltranslation-owner

Type:string
class AnalyticsConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.AnalyticsConfigurationProperty;
// CfnBucket.AnalyticsConfigurationProperty is an interface
import { CfnBucket.AnalyticsConfigurationProperty } from '@aws-cdk/aws-s3';
id

CfnBucket.AnalyticsConfigurationProperty.Id

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-id

Type:string
storageClassAnalysis

CfnBucket.AnalyticsConfigurationProperty.StorageClassAnalysis

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-storageclassanalysis

Type:@aws-cdk/cdk.Token or StorageClassAnalysisProperty
prefix

CfnBucket.AnalyticsConfigurationProperty.Prefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-prefix

Type:string (optional)
tagFilters

CfnBucket.AnalyticsConfigurationProperty.TagFilters

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-analyticsconfiguration.html#cfn-s3-bucket-analyticsconfiguration-tagfilters

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or TagFilterProperty)[] (optional)
class BucketEncryptionProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.BucketEncryptionProperty;
// CfnBucket.BucketEncryptionProperty is an interface
import { CfnBucket.BucketEncryptionProperty } from '@aws-cdk/aws-s3';
serverSideEncryptionConfiguration

CfnBucket.BucketEncryptionProperty.ServerSideEncryptionConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-bucketencryption.html#cfn-s3-bucket-bucketencryption-serversideencryptionconfiguration

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or ServerSideEncryptionRuleProperty)[]
class CorsConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.CorsConfigurationProperty;
// CfnBucket.CorsConfigurationProperty is an interface
import { CfnBucket.CorsConfigurationProperty } from '@aws-cdk/aws-s3';
corsRules

CfnBucket.CorsConfigurationProperty.CorsRules

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors.html#cfn-s3-bucket-cors-corsrule

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or CorsRuleProperty)[]
class CorsRuleProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.CorsRuleProperty;
// CfnBucket.CorsRuleProperty is an interface
import { CfnBucket.CorsRuleProperty } from '@aws-cdk/aws-s3';
allowedMethods

CfnBucket.CorsRuleProperty.AllowedMethods

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-allowedmethods

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[]
allowedOrigins

CfnBucket.CorsRuleProperty.AllowedOrigins

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-allowedorigins

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[]
allowedHeaders

CfnBucket.CorsRuleProperty.AllowedHeaders

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-allowedheaders

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
exposedHeaders

CfnBucket.CorsRuleProperty.ExposedHeaders

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-exposedheaders

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
id

CfnBucket.CorsRuleProperty.Id

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-id

Type:string (optional)
maxAge

CfnBucket.CorsRuleProperty.MaxAge

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors-corsrule.html#cfn-s3-bucket-cors-corsrule-maxage

Type:number or @aws-cdk/cdk.Token (optional)
class DataExportProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.DataExportProperty;
// CfnBucket.DataExportProperty is an interface
import { CfnBucket.DataExportProperty } from '@aws-cdk/aws-s3';
destination

CfnBucket.DataExportProperty.Destination

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-dataexport.html#cfn-s3-bucket-dataexport-destination

Type:@aws-cdk/cdk.Token or DestinationProperty
outputSchemaVersion

CfnBucket.DataExportProperty.OutputSchemaVersion

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-dataexport.html#cfn-s3-bucket-dataexport-outputschemaversion

Type:string
class DestinationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.DestinationProperty;
// CfnBucket.DestinationProperty is an interface
import { CfnBucket.DestinationProperty } from '@aws-cdk/aws-s3';
bucketArn

CfnBucket.DestinationProperty.BucketArn

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-bucketarn

Type:string
format

CfnBucket.DestinationProperty.Format

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-format

Type:string
bucketAccountId

CfnBucket.DestinationProperty.BucketAccountId

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-bucketaccountid

Type:string (optional)
prefix

CfnBucket.DestinationProperty.Prefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-destination.html#cfn-s3-bucket-destination-prefix

Type:string (optional)
class EncryptionConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.EncryptionConfigurationProperty;
// CfnBucket.EncryptionConfigurationProperty is an interface
import { CfnBucket.EncryptionConfigurationProperty } from '@aws-cdk/aws-s3';
replicaKmsKeyId

CfnBucket.EncryptionConfigurationProperty.ReplicaKmsKeyID

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-encryptionconfiguration.html#cfn-s3-bucket-encryptionconfiguration-replicakmskeyid

Type:string
class FilterRuleProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.FilterRuleProperty;
// CfnBucket.FilterRuleProperty is an interface
import { CfnBucket.FilterRuleProperty } from '@aws-cdk/aws-s3';
name

CfnBucket.FilterRuleProperty.Name

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules-name

Type:string
value

CfnBucket.FilterRuleProperty.Value

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key-rules.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules-value

Type:string
class InventoryConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.InventoryConfigurationProperty;
// CfnBucket.InventoryConfigurationProperty is an interface
import { CfnBucket.InventoryConfigurationProperty } from '@aws-cdk/aws-s3';
destination

CfnBucket.InventoryConfigurationProperty.Destination

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-destination

Type:@aws-cdk/cdk.Token or DestinationProperty
enabled

CfnBucket.InventoryConfigurationProperty.Enabled

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-enabled

Type:boolean or @aws-cdk/cdk.Token
id

CfnBucket.InventoryConfigurationProperty.Id

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-id

Type:string
includedObjectVersions

CfnBucket.InventoryConfigurationProperty.IncludedObjectVersions

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-includedobjectversions

Type:string
scheduleFrequency

CfnBucket.InventoryConfigurationProperty.ScheduleFrequency

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-schedulefrequency

Type:string
optionalFields

CfnBucket.InventoryConfigurationProperty.OptionalFields

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-optionalfields

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
prefix

CfnBucket.InventoryConfigurationProperty.Prefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-inventoryconfiguration.html#cfn-s3-bucket-inventoryconfiguration-prefix

Type:string (optional)
class LambdaConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.LambdaConfigurationProperty;
// CfnBucket.LambdaConfigurationProperty is an interface
import { CfnBucket.LambdaConfigurationProperty } from '@aws-cdk/aws-s3';
event

CfnBucket.LambdaConfigurationProperty.Event

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-event

Type:string
function

CfnBucket.LambdaConfigurationProperty.Function

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-function

Type:string
filter

CfnBucket.LambdaConfigurationProperty.Filter

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-lambdaconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig-filter

Type:@aws-cdk/cdk.Token or NotificationFilterProperty (optional)
class LifecycleConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.LifecycleConfigurationProperty;
// CfnBucket.LifecycleConfigurationProperty is an interface
import { CfnBucket.LifecycleConfigurationProperty } from '@aws-cdk/aws-s3';
rules

CfnBucket.LifecycleConfigurationProperty.Rules

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig.html#cfn-s3-bucket-lifecycleconfig-rules

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or RuleProperty)[]
class LoggingConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.LoggingConfigurationProperty;
// CfnBucket.LoggingConfigurationProperty is an interface
import { CfnBucket.LoggingConfigurationProperty } from '@aws-cdk/aws-s3';
destinationBucketName

CfnBucket.LoggingConfigurationProperty.DestinationBucketName

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfig.html#cfn-s3-bucket-loggingconfig-destinationbucketname

Type:string (optional)
logFilePrefix

CfnBucket.LoggingConfigurationProperty.LogFilePrefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfig.html#cfn-s3-bucket-loggingconfig-logfileprefix

Type:string (optional)
class MetricsConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.MetricsConfigurationProperty;
// CfnBucket.MetricsConfigurationProperty is an interface
import { CfnBucket.MetricsConfigurationProperty } from '@aws-cdk/aws-s3';
id

CfnBucket.MetricsConfigurationProperty.Id

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-id

Type:string
prefix

CfnBucket.MetricsConfigurationProperty.Prefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-prefix

Type:string (optional)
tagFilters

CfnBucket.MetricsConfigurationProperty.TagFilters

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-tagfilters

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or TagFilterProperty)[] (optional)
class NoncurrentVersionTransitionProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.NoncurrentVersionTransitionProperty;
// CfnBucket.NoncurrentVersionTransitionProperty is an interface
import { CfnBucket.NoncurrentVersionTransitionProperty } from '@aws-cdk/aws-s3';
storageClass

CfnBucket.NoncurrentVersionTransitionProperty.StorageClass

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition-storageclass

Type:string
transitionInDays

CfnBucket.NoncurrentVersionTransitionProperty.TransitionInDays

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition-transitionindays

Type:number or @aws-cdk/cdk.Token
class NotificationConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.NotificationConfigurationProperty;
// CfnBucket.NotificationConfigurationProperty is an interface
import { CfnBucket.NotificationConfigurationProperty } from '@aws-cdk/aws-s3';
lambdaConfigurations

CfnBucket.NotificationConfigurationProperty.LambdaConfigurations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html#cfn-s3-bucket-notificationconfig-lambdaconfig

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or LambdaConfigurationProperty)[] (optional)
queueConfigurations

CfnBucket.NotificationConfigurationProperty.QueueConfigurations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html#cfn-s3-bucket-notificationconfig-queueconfig

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or QueueConfigurationProperty)[] (optional)
topicConfigurations

CfnBucket.NotificationConfigurationProperty.TopicConfigurations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig.html#cfn-s3-bucket-notificationconfig-topicconfig

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or TopicConfigurationProperty)[] (optional)
class NotificationFilterProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.NotificationFilterProperty;
// CfnBucket.NotificationFilterProperty is an interface
import { CfnBucket.NotificationFilterProperty } from '@aws-cdk/aws-s3';
s3Key

CfnBucket.NotificationFilterProperty.S3Key

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key

Type:@aws-cdk/cdk.Token or S3KeyFilterProperty
class PublicAccessBlockConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.PublicAccessBlockConfigurationProperty;
// CfnBucket.PublicAccessBlockConfigurationProperty is an interface
import { CfnBucket.PublicAccessBlockConfigurationProperty } from '@aws-cdk/aws-s3';
blockPublicAcls

CfnBucket.PublicAccessBlockConfigurationProperty.BlockPublicAcls

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-blockpublicacls

Type:boolean or @aws-cdk/cdk.Token (optional)
blockPublicPolicy

CfnBucket.PublicAccessBlockConfigurationProperty.BlockPublicPolicy

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-blockpublicpolicy

Type:boolean or @aws-cdk/cdk.Token (optional)
ignorePublicAcls

CfnBucket.PublicAccessBlockConfigurationProperty.IgnorePublicAcls

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-ignorepublicacls

Type:boolean or @aws-cdk/cdk.Token (optional)
restrictPublicBuckets

CfnBucket.PublicAccessBlockConfigurationProperty.RestrictPublicBuckets

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-publicaccessblockconfiguration.html#cfn-s3-bucket-publicaccessblockconfiguration-restrictpublicbuckets

Type:boolean or @aws-cdk/cdk.Token (optional)
class QueueConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.QueueConfigurationProperty;
// CfnBucket.QueueConfigurationProperty is an interface
import { CfnBucket.QueueConfigurationProperty } from '@aws-cdk/aws-s3';
event

CfnBucket.QueueConfigurationProperty.Event

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html#cfn-s3-bucket-notificationconfig-queueconfig-event

Type:string
queue

CfnBucket.QueueConfigurationProperty.Queue

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html#cfn-s3-bucket-notificationconfig-queueconfig-queue

Type:string
filter

CfnBucket.QueueConfigurationProperty.Filter

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-queueconfig.html#cfn-s3-bucket-notificationconfig-queueconfig-filter

Type:@aws-cdk/cdk.Token or NotificationFilterProperty (optional)
class RedirectAllRequestsToProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.RedirectAllRequestsToProperty;
// CfnBucket.RedirectAllRequestsToProperty is an interface
import { CfnBucket.RedirectAllRequestsToProperty } from '@aws-cdk/aws-s3';
hostName

CfnBucket.RedirectAllRequestsToProperty.HostName

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-redirectallrequeststo.html#cfn-s3-websiteconfiguration-redirectallrequeststo-hostname

Type:string
protocol

CfnBucket.RedirectAllRequestsToProperty.Protocol

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-redirectallrequeststo.html#cfn-s3-websiteconfiguration-redirectallrequeststo-protocol

Type:string (optional)
class RedirectRuleProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.RedirectRuleProperty;
// CfnBucket.RedirectRuleProperty is an interface
import { CfnBucket.RedirectRuleProperty } from '@aws-cdk/aws-s3';
hostName

CfnBucket.RedirectRuleProperty.HostName

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-hostname

Type:string (optional)
httpRedirectCode

CfnBucket.RedirectRuleProperty.HttpRedirectCode

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-httpredirectcode

Type:string (optional)
protocol

CfnBucket.RedirectRuleProperty.Protocol

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-protocol

Type:string (optional)
replaceKeyPrefixWith

CfnBucket.RedirectRuleProperty.ReplaceKeyPrefixWith

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-replacekeyprefixwith

Type:string (optional)
replaceKeyWith

CfnBucket.RedirectRuleProperty.ReplaceKeyWith

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-redirectrule.html#cfn-s3-websiteconfiguration-redirectrule-replacekeywith

Type:string (optional)
class ReplicationConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.ReplicationConfigurationProperty;
// CfnBucket.ReplicationConfigurationProperty is an interface
import { CfnBucket.ReplicationConfigurationProperty } from '@aws-cdk/aws-s3';
role

CfnBucket.ReplicationConfigurationProperty.Role

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html#cfn-s3-bucket-replicationconfiguration-role

Type:string
rules

CfnBucket.ReplicationConfigurationProperty.Rules

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration.html#cfn-s3-bucket-replicationconfiguration-rules

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or ReplicationRuleProperty)[]
class ReplicationDestinationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.ReplicationDestinationProperty;
// CfnBucket.ReplicationDestinationProperty is an interface
import { CfnBucket.ReplicationDestinationProperty } from '@aws-cdk/aws-s3';
bucket

CfnBucket.ReplicationDestinationProperty.Bucket

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationconfiguration-rules-destination-bucket

Type:string
accessControlTranslation

CfnBucket.ReplicationDestinationProperty.AccessControlTranslation

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationdestination-accesscontroltranslation

Type:@aws-cdk/cdk.Token or AccessControlTranslationProperty (optional)
account

CfnBucket.ReplicationDestinationProperty.Account

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationdestination-account

Type:string (optional)
encryptionConfiguration

CfnBucket.ReplicationDestinationProperty.EncryptionConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationdestination-encryptionconfiguration

Type:@aws-cdk/cdk.Token or EncryptionConfigurationProperty (optional)
storageClass

CfnBucket.ReplicationDestinationProperty.StorageClass

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules-destination.html#cfn-s3-bucket-replicationconfiguration-rules-destination-storageclass

Type:string (optional)
class ReplicationRuleProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.ReplicationRuleProperty;
// CfnBucket.ReplicationRuleProperty is an interface
import { CfnBucket.ReplicationRuleProperty } from '@aws-cdk/aws-s3';
destination

CfnBucket.ReplicationRuleProperty.Destination

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-destination

Type:@aws-cdk/cdk.Token or ReplicationDestinationProperty
prefix

CfnBucket.ReplicationRuleProperty.Prefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-prefix

Type:string
status

CfnBucket.ReplicationRuleProperty.Status

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-status

Type:string
id

CfnBucket.ReplicationRuleProperty.Id

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationconfiguration-rules-id

Type:string (optional)
sourceSelectionCriteria

CfnBucket.ReplicationRuleProperty.SourceSelectionCriteria

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-replicationconfiguration-rules.html#cfn-s3-bucket-replicationrule-sourceselectioncriteria

Type:@aws-cdk/cdk.Token or SourceSelectionCriteriaProperty (optional)
class RoutingRuleConditionProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.RoutingRuleConditionProperty;
// CfnBucket.RoutingRuleConditionProperty is an interface
import { CfnBucket.RoutingRuleConditionProperty } from '@aws-cdk/aws-s3';
httpErrorCodeReturnedEquals

CfnBucket.RoutingRuleConditionProperty.HttpErrorCodeReturnedEquals

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-routingrulecondition.html#cfn-s3-websiteconfiguration-routingrules-routingrulecondition-httperrorcodereturnedequals

Type:string (optional)
keyPrefixEquals

CfnBucket.RoutingRuleConditionProperty.KeyPrefixEquals

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules-routingrulecondition.html#cfn-s3-websiteconfiguration-routingrules-routingrulecondition-keyprefixequals

Type:string (optional)
class RoutingRuleProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.RoutingRuleProperty;
// CfnBucket.RoutingRuleProperty is an interface
import { CfnBucket.RoutingRuleProperty } from '@aws-cdk/aws-s3';
redirectRule

CfnBucket.RoutingRuleProperty.RedirectRule

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html#cfn-s3-websiteconfiguration-routingrules-redirectrule

Type:@aws-cdk/cdk.Token or RedirectRuleProperty
routingRuleCondition

CfnBucket.RoutingRuleProperty.RoutingRuleCondition

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration-routingrules.html#cfn-s3-websiteconfiguration-routingrules-routingrulecondition

Type:@aws-cdk/cdk.Token or RoutingRuleConditionProperty (optional)
class RuleProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.RuleProperty;
// CfnBucket.RuleProperty is an interface
import { CfnBucket.RuleProperty } from '@aws-cdk/aws-s3';
status

CfnBucket.RuleProperty.Status

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-status

Type:string
abortIncompleteMultipartUpload

CfnBucket.RuleProperty.AbortIncompleteMultipartUpload

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-rule-abortincompletemultipartupload

Type:@aws-cdk/cdk.Token or AbortIncompleteMultipartUploadProperty (optional)
expirationDate

CfnBucket.RuleProperty.ExpirationDate

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-expirationdate

Type:@aws-cdk/cdk.Token or date (optional)
expirationInDays

CfnBucket.RuleProperty.ExpirationInDays

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-expirationindays

Type:number or @aws-cdk/cdk.Token (optional)
id

CfnBucket.RuleProperty.Id

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-id

Type:string (optional)
noncurrentVersionExpirationInDays

CfnBucket.RuleProperty.NoncurrentVersionExpirationInDays

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversionexpirationindays

Type:number or @aws-cdk/cdk.Token (optional)
noncurrentVersionTransition

CfnBucket.RuleProperty.NoncurrentVersionTransition

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransition

Type:@aws-cdk/cdk.Token or NoncurrentVersionTransitionProperty (optional)
noncurrentVersionTransitions

CfnBucket.RuleProperty.NoncurrentVersionTransitions

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-noncurrentversiontransitions

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or NoncurrentVersionTransitionProperty)[] (optional)
prefix

CfnBucket.RuleProperty.Prefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-prefix

Type:string (optional)
tagFilters

CfnBucket.RuleProperty.TagFilters

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-rule-tagfilters

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or TagFilterProperty)[] (optional)
transition

CfnBucket.RuleProperty.Transition

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-transition

Type:@aws-cdk/cdk.Token or TransitionProperty (optional)
transitions

CfnBucket.RuleProperty.Transitions

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html#cfn-s3-bucket-lifecycleconfig-rule-transitions

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or TransitionProperty)[] (optional)
class S3KeyFilterProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.S3KeyFilterProperty;
// CfnBucket.S3KeyFilterProperty is an interface
import { CfnBucket.S3KeyFilterProperty } from '@aws-cdk/aws-s3';
rules

CfnBucket.S3KeyFilterProperty.Rules

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfiguration-config-filter-s3key.html#cfn-s3-bucket-notificationconfiguraiton-config-filter-s3key-rules

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or FilterRuleProperty)[]
class ServerSideEncryptionByDefaultProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.ServerSideEncryptionByDefaultProperty;
// CfnBucket.ServerSideEncryptionByDefaultProperty is an interface
import { CfnBucket.ServerSideEncryptionByDefaultProperty } from '@aws-cdk/aws-s3';
sseAlgorithm

CfnBucket.ServerSideEncryptionByDefaultProperty.SSEAlgorithm

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.html#cfn-s3-bucket-serversideencryptionbydefault-ssealgorithm

Type:string
kmsMasterKeyId

CfnBucket.ServerSideEncryptionByDefaultProperty.KMSMasterKeyID

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.html#cfn-s3-bucket-serversideencryptionbydefault-kmsmasterkeyid

Type:string (optional)
class ServerSideEncryptionRuleProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.ServerSideEncryptionRuleProperty;
// CfnBucket.ServerSideEncryptionRuleProperty is an interface
import { CfnBucket.ServerSideEncryptionRuleProperty } from '@aws-cdk/aws-s3';
serverSideEncryptionByDefault

CfnBucket.ServerSideEncryptionRuleProperty.ServerSideEncryptionByDefault

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionrule.html#cfn-s3-bucket-serversideencryptionrule-serversideencryptionbydefault

Type:@aws-cdk/cdk.Token or ServerSideEncryptionByDefaultProperty (optional)
class SourceSelectionCriteriaProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.SourceSelectionCriteriaProperty;
// CfnBucket.SourceSelectionCriteriaProperty is an interface
import { CfnBucket.SourceSelectionCriteriaProperty } from '@aws-cdk/aws-s3';
sseKmsEncryptedObjects

CfnBucket.SourceSelectionCriteriaProperty.SseKmsEncryptedObjects

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-sourceselectioncriteria.html#cfn-s3-bucket-sourceselectioncriteria-ssekmsencryptedobjects

Type:@aws-cdk/cdk.Token or SseKmsEncryptedObjectsProperty
class SseKmsEncryptedObjectsProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.SseKmsEncryptedObjectsProperty;
// CfnBucket.SseKmsEncryptedObjectsProperty is an interface
import { CfnBucket.SseKmsEncryptedObjectsProperty } from '@aws-cdk/aws-s3';
status

CfnBucket.SseKmsEncryptedObjectsProperty.Status

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-ssekmsencryptedobjects.html#cfn-s3-bucket-ssekmsencryptedobjects-status

Type:string
class StorageClassAnalysisProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.StorageClassAnalysisProperty;
// CfnBucket.StorageClassAnalysisProperty is an interface
import { CfnBucket.StorageClassAnalysisProperty } from '@aws-cdk/aws-s3';
dataExport

CfnBucket.StorageClassAnalysisProperty.DataExport

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-storageclassanalysis.html#cfn-s3-bucket-storageclassanalysis-dataexport

Type:@aws-cdk/cdk.Token or DataExportProperty (optional)
class TagFilterProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.TagFilterProperty;
// CfnBucket.TagFilterProperty is an interface
import { CfnBucket.TagFilterProperty } from '@aws-cdk/aws-s3';
key

CfnBucket.TagFilterProperty.Key

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tagfilter.html#cfn-s3-bucket-tagfilter-key

Type:string
value

CfnBucket.TagFilterProperty.Value

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-tagfilter.html#cfn-s3-bucket-tagfilter-value

Type:string
class TopicConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.TopicConfigurationProperty;
// CfnBucket.TopicConfigurationProperty is an interface
import { CfnBucket.TopicConfigurationProperty } from '@aws-cdk/aws-s3';
event

CfnBucket.TopicConfigurationProperty.Event

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html#cfn-s3-bucket-notificationconfig-topicconfig-event

Type:string
topic

CfnBucket.TopicConfigurationProperty.Topic

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html#cfn-s3-bucket-notificationconfig-topicconfig-topic

Type:string
filter

CfnBucket.TopicConfigurationProperty.Filter

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-notificationconfig-topicconfig.html#cfn-s3-bucket-notificationconfig-topicconfig-filter

Type:@aws-cdk/cdk.Token or NotificationFilterProperty (optional)
class TransitionProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.TransitionProperty;
// CfnBucket.TransitionProperty is an interface
import { CfnBucket.TransitionProperty } from '@aws-cdk/aws-s3';
storageClass

CfnBucket.TransitionProperty.StorageClass

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-transition.html#cfn-s3-bucket-lifecycleconfig-rule-transition-storageclass

Type:string
transitionDate

CfnBucket.TransitionProperty.TransitionDate

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-transition.html#cfn-s3-bucket-lifecycleconfig-rule-transition-transitiondate

Type:@aws-cdk/cdk.Token or date (optional)
transitionInDays

CfnBucket.TransitionProperty.TransitionInDays

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule-transition.html#cfn-s3-bucket-lifecycleconfig-rule-transition-transitionindays

Type:number or @aws-cdk/cdk.Token (optional)
class VersioningConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.VersioningConfigurationProperty;
// CfnBucket.VersioningConfigurationProperty is an interface
import { CfnBucket.VersioningConfigurationProperty } from '@aws-cdk/aws-s3';
status

CfnBucket.VersioningConfigurationProperty.Status

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-versioningconfig.html#cfn-s3-bucket-versioningconfig-status

Type:string
class WebsiteConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucket.WebsiteConfigurationProperty;
// CfnBucket.WebsiteConfigurationProperty is an interface
import { CfnBucket.WebsiteConfigurationProperty } from '@aws-cdk/aws-s3';
errorDocument

CfnBucket.WebsiteConfigurationProperty.ErrorDocument

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-errordocument

Type:string (optional)
indexDocument

CfnBucket.WebsiteConfigurationProperty.IndexDocument

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-indexdocument

Type:string (optional)
redirectAllRequestsTo

CfnBucket.WebsiteConfigurationProperty.RedirectAllRequestsTo

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-redirectallrequeststo

Type:@aws-cdk/cdk.Token or RedirectAllRequestsToProperty (optional)
routingRules

CfnBucket.WebsiteConfigurationProperty.RoutingRules

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-websiteconfiguration.html#cfn-s3-websiteconfiguration-routingrules

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or RoutingRuleProperty)[] (optional)
apply(aspect)

Inherited from @aws-cdk/cdk.Construct

Applies the aspect to this Constructs node

Parameters:aspect (@aws-cdk/cdk.IAspect) –
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)
ref

Inherited from @aws-cdk/cdk.Referenceable

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.Resource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.Resource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.Resource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to the synthesized CloudFormation resource. To add a

property override, either use addPropertyOverride or prefix path with

“Properties.” (i.e. Properties.TopicName).

Parameters:
  • path (string) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
  • value (any) – The value. Could be primitive or complex.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.Resource

Adds an override that deletes the value of a property from the resource definition.

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.Resource

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility

in case there is no generated attribute.

Parameters:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
toCloudFormation() → json

Inherited from @aws-cdk/cdk.Resource

Emits CloudFormation for this resource.

Return type:json
options

Inherited from @aws-cdk/cdk.Resource

Options for this resource, such as condition, update policy etc.

Type:@aws-cdk/cdk.ResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.Resource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.Resource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.Resource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.StackElement

Overrides the auto-generated logical ID with a specific ID.

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.StackElement

Automatically detect references in this StackElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.StackElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.StackElement

The logical ID for this CloudFormation stack element. The logical ID of the element

is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.StackElement

Return the path with respect to the stack

Type:string (readonly)
stack

Inherited from @aws-cdk/cdk.StackElement

The stack this Construct has been made a part of

Protected property

Type:@aws-cdk/cdk.Stack

CfnBucketPolicy

class @aws-cdk/aws-s3.CfnBucketPolicy(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucketPolicy;
const { CfnBucketPolicy } = require('@aws-cdk/aws-s3');
import { CfnBucketPolicy } from '@aws-cdk/aws-s3';
Extends:

@aws-cdk/cdk.Resource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.Resource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
propertyOverrides
Type:CfnBucketPolicyProps (readonly)
apply(aspect)

Inherited from @aws-cdk/cdk.Construct

Applies the aspect to this Constructs node

Parameters:aspect (@aws-cdk/cdk.IAspect) –
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)
ref

Inherited from @aws-cdk/cdk.Referenceable

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.Resource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.Resource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.Resource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to the synthesized CloudFormation resource. To add a

property override, either use addPropertyOverride or prefix path with

“Properties.” (i.e. Properties.TopicName).

Parameters:
  • path (string) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
  • value (any) – The value. Could be primitive or complex.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.Resource

Adds an override that deletes the value of a property from the resource definition.

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.Resource

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility

in case there is no generated attribute.

Parameters:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
toCloudFormation() → json

Inherited from @aws-cdk/cdk.Resource

Emits CloudFormation for this resource.

Return type:json
options

Inherited from @aws-cdk/cdk.Resource

Options for this resource, such as condition, update policy etc.

Type:@aws-cdk/cdk.ResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.Resource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.Resource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.Resource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.StackElement

Overrides the auto-generated logical ID with a specific ID.

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.StackElement

Automatically detect references in this StackElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.StackElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.StackElement

The logical ID for this CloudFormation stack element. The logical ID of the element

is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.StackElement

Return the path with respect to the stack

Type:string (readonly)
stack

Inherited from @aws-cdk/cdk.StackElement

The stack this Construct has been made a part of

Protected property

Type:@aws-cdk/cdk.Stack

CfnBucketPolicyProps (interface)

class @aws-cdk/aws-s3.CfnBucketPolicyProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucketPolicyProps;
// CfnBucketPolicyProps is an interface
import { CfnBucketPolicyProps } from '@aws-cdk/aws-s3';
bucket

AWS::S3::BucketPolicy.Bucket

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html#aws-properties-s3-policy-bucket

Type:string
policyDocument

AWS::S3::BucketPolicy.PolicyDocument

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html#aws-properties-s3-policy-policydocument

Type:json or @aws-cdk/cdk.Token

CfnBucketProps (interface)

class @aws-cdk/aws-s3.CfnBucketProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CfnBucketProps;
// CfnBucketProps is an interface
import { CfnBucketProps } from '@aws-cdk/aws-s3';
accelerateConfiguration

AWS::S3::Bucket.AccelerateConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-accelerateconfiguration

Type:@aws-cdk/cdk.Token or AccelerateConfigurationProperty (optional)
accessControl

AWS::S3::Bucket.AccessControl

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-accesscontrol

Type:string (optional)
analyticsConfigurations

AWS::S3::Bucket.AnalyticsConfigurations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-analyticsconfigurations

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or AnalyticsConfigurationProperty)[] (optional)
bucketEncryption

AWS::S3::Bucket.BucketEncryption

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-bucketencryption

Type:@aws-cdk/cdk.Token or BucketEncryptionProperty (optional)
bucketName

AWS::S3::Bucket.BucketName

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-name

Type:string (optional)
corsConfiguration

AWS::S3::Bucket.CorsConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-crossoriginconfig

Type:@aws-cdk/cdk.Token or CorsConfigurationProperty (optional)
inventoryConfigurations

AWS::S3::Bucket.InventoryConfigurations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-inventoryconfigurations

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or InventoryConfigurationProperty)[] (optional)
lifecycleConfiguration

AWS::S3::Bucket.LifecycleConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-lifecycleconfig

Type:@aws-cdk/cdk.Token or LifecycleConfigurationProperty (optional)
loggingConfiguration

AWS::S3::Bucket.LoggingConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-loggingconfig

Type:@aws-cdk/cdk.Token or LoggingConfigurationProperty (optional)
metricsConfigurations

AWS::S3::Bucket.MetricsConfigurations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-metricsconfigurations

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or MetricsConfigurationProperty)[] (optional)
notificationConfiguration

AWS::S3::Bucket.NotificationConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-notification

Type:@aws-cdk/cdk.Token or NotificationConfigurationProperty (optional)
publicAccessBlockConfiguration

AWS::S3::Bucket.PublicAccessBlockConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-publicaccessblockconfiguration

Type:@aws-cdk/cdk.Token or PublicAccessBlockConfigurationProperty (optional)
replicationConfiguration

AWS::S3::Bucket.ReplicationConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-replicationconfiguration

Type:@aws-cdk/cdk.Token or ReplicationConfigurationProperty (optional)
tags

AWS::S3::Bucket.Tags

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-tags

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or @aws-cdk/cdk.CfnTag)[] (optional)
versioningConfiguration

AWS::S3::Bucket.VersioningConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-versioning

Type:@aws-cdk/cdk.Token or VersioningConfigurationProperty (optional)
websiteConfiguration

AWS::S3::Bucket.WebsiteConfiguration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-websiteconfiguration

Type:@aws-cdk/cdk.Token or WebsiteConfigurationProperty (optional)

CommonPipelineDeployActionProps (interface)

class @aws-cdk/aws-s3.CommonPipelineDeployActionProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CommonPipelineDeployActionProps;
// CommonPipelineDeployActionProps is an interface
import { CommonPipelineDeployActionProps } from '@aws-cdk/aws-s3';

Common properties for creating {@link PipelineDeployAction} -

either directly, through its constructor,

or through {@link IBucket#addToPipelineAsDeploy}.

Extends:@aws-cdk/aws-codepipeline-api.CommonActionProps
extract

Should the deploy action extract the artifact before deploying to Amazon S3.

Type:boolean (optional)
Default:true
inputArtifact

The inputArtifact to deploy to Amazon S3.

Type:@aws-cdk/aws-codepipeline-api.Artifact (optional)
objectKey

The key of the target object. This is required if extract is false.

Type:string (optional)
runOrder

Inherited from @aws-cdk/aws-codepipeline-api.CommonActionProps

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.

Type:number (optional)
Default:1

CommonPipelineSourceActionProps (interface)

class @aws-cdk/aws-s3.CommonPipelineSourceActionProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.CommonPipelineSourceActionProps;
// CommonPipelineSourceActionProps is an interface
import { CommonPipelineSourceActionProps } from '@aws-cdk/aws-s3';

Common properties for creating {@link PipelineSourceAction} -

either directly, through its constructor,

or through {@link IBucket#addToPipeline}.

Extends:@aws-cdk/aws-codepipeline-api.CommonActionProps
bucketKey

The key within the S3 bucket that stores the source code.

Type:string
outputArtifactName

The name of the source’s output artifact. Output artifacts are used by CodePipeline as

inputs into other actions.

Type:string (optional)
Default:a name will be auto-generated
pollForSourceChanges

Whether AWS CodePipeline should poll for source changes.

If this is false, the Pipeline will use CloudWatch Events to detect source changes instead.

Note that if this is false, you need to make sure to include the source Bucket in a CloudTrail Trail,

as otherwise the CloudWatch Events will not be emitted.

Type:boolean (optional)
Default:true
runOrder

Inherited from @aws-cdk/aws-codepipeline-api.CommonActionProps

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.

Type:number (optional)
Default:1

EventType (enum)

class @aws-cdk/aws-s3.EventType

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.EventType;
const { EventType } = require('@aws-cdk/aws-s3');
import { EventType } from '@aws-cdk/aws-s3';

Notification event types.

ObjectCreated

Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using

these event types, you can enable notification when an object is created

using a specific API, or you can use the s3:ObjectCreated:* event type to

request notification regardless of the API that was used to create an

object.

ObjectCreatedPut

Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using

these event types, you can enable notification when an object is created

using a specific API, or you can use the s3:ObjectCreated:* event type to

request notification regardless of the API that was used to create an

object.

ObjectCreatedPost

Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using

these event types, you can enable notification when an object is created

using a specific API, or you can use the s3:ObjectCreated:* event type to

request notification regardless of the API that was used to create an

object.

ObjectCreatedCopy

Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using

these event types, you can enable notification when an object is created

using a specific API, or you can use the s3:ObjectCreated:* event type to

request notification regardless of the API that was used to create an

object.

ObjectCreatedCompleteMultipartUpload

Amazon S3 APIs such as PUT, POST, and COPY can create an object. Using

these event types, you can enable notification when an object is created

using a specific API, or you can use the s3:ObjectCreated:* event type to

request notification regardless of the API that was used to create an

object.

ObjectRemoved

By using the ObjectRemoved event types, you can enable notification when

an object or a batch of objects is removed from a bucket.

You can request notification when an object is deleted or a versioned

object is permanently deleted by using the s3:ObjectRemoved:Delete event

type. Or you can request notification when a delete marker is created for

a versioned object by using s3:ObjectRemoved:DeleteMarkerCreated. For

information about deleting versioned objects, see Deleting Object

Versions. You can also use a wildcard s3:ObjectRemoved:* to request

notification anytime an object is deleted.

You will not receive event notifications from automatic deletes from

lifecycle policies or from failed operations.

ObjectRemovedDelete

By using the ObjectRemoved event types, you can enable notification when

an object or a batch of objects is removed from a bucket.

You can request notification when an object is deleted or a versioned

object is permanently deleted by using the s3:ObjectRemoved:Delete event

type. Or you can request notification when a delete marker is created for

a versioned object by using s3:ObjectRemoved:DeleteMarkerCreated. For

information about deleting versioned objects, see Deleting Object

Versions. You can also use a wildcard s3:ObjectRemoved:* to request

notification anytime an object is deleted.

You will not receive event notifications from automatic deletes from

lifecycle policies or from failed operations.

ObjectRemovedDeleteMarkerCreated

By using the ObjectRemoved event types, you can enable notification when

an object or a batch of objects is removed from a bucket.

You can request notification when an object is deleted or a versioned

object is permanently deleted by using the s3:ObjectRemoved:Delete event

type. Or you can request notification when a delete marker is created for

a versioned object by using s3:ObjectRemoved:DeleteMarkerCreated. For

information about deleting versioned objects, see Deleting Object

Versions. You can also use a wildcard s3:ObjectRemoved:* to request

notification anytime an object is deleted.

You will not receive event notifications from automatic deletes from

lifecycle policies or from failed operations.

ReducedRedundancyLostObject

You can use this event type to request Amazon S3 to send a notification

message when Amazon S3 detects that an object of the RRS storage class is

lost.

IBucket (interface)

class @aws-cdk/aws-s3.IBucket

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.IBucket;
// IBucket is an interface
import { IBucket } from '@aws-cdk/aws-s3';
Extends:@aws-cdk/cdk.IConstruct
bucketArn

The ARN of the bucket.

Type:string (readonly)
bucketName

The name of the bucket.

Type:string (readonly)
bucketUrl

The https:// URL of this bucket.

Type:string (readonly)
domainName

The domain of the bucket.

Type:string (readonly)
encryptionKey

Optional KMS encryption key associated with this bucket.

Type:@aws-cdk/aws-kms.IEncryptionKey (optional) (readonly)
policy

The resource policy assoicated with this bucket.

If autoCreatePolicy is true, a BucketPolicy will be created upon the

first call to addToResourcePolicy(s).

Type:BucketPolicy (optional)
addToPipeline(stage, name, props) → @aws-cdk/aws-s3.PipelineSourceAction

Convenience method for creating a new {@link PipelineSourceAction},

and adding it to the given Stage.

Parameters:
Returns:

the newly created {@link PipelineSourceAction}

Return type:

PipelineSourceAction

Abstract:

Yes

addToPipelineAsDeploy(stage, name[, props]) → @aws-cdk/aws-s3.PipelineDeployAction

Convenience method for creating a new {@link PipelineDeployAction},

and adding it to the given Stage.

Parameters:
Returns:

the newly created {@link PipelineDeployAction}

Return type:

PipelineDeployAction

Abstract:

Yes

addToResourcePolicy(permission)

Adds a statement to the resource policy for a principal (i.e.

account/role/service) to perform actions on this bucket and/or it’s

contents. Use bucketArn and arnForObjects(keys) to obtain ARNs for

this bucket or objects.

Parameters:permission (@aws-cdk/aws-iam.PolicyStatement) –
Abstract:Yes
arnForObjects(*keyPattern) → string

Returns an ARN that represents all objects within the bucket that match

the key pattern specified. To represent all keys, specify "*".

If you specify multiple components for keyPattern, they will be concatenated:

arnForObjects('home/', team, '/', user, '/*')
Parameters:*keyPattern (string) –
Return type:string
Abstract:Yes
export() → @aws-cdk/aws-s3.BucketImportProps

Exports this bucket from the stack.

Return type:BucketImportProps
Abstract:Yes
grantDelete([identity[, objectsKeyPattern]])

Grants s3:DeleteObject* permission to an IAM pricipal for objects

in this bucket.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
Abstract:

Yes

grantPublicAccess(keyPrefix, *allowedActions) → @aws-cdk/aws-iam.PolicyStatement

Allows unrestricted access to objects from this bucket.

IMPORTANT: This permission allows anyone to perform actions on S3 objects

in this bucket, which is useful for when you configure your bucket as a

website and want everyone to be able to read objects in the bucket without

needing to authenticate.

Without arguments, this method will grant read (“s3:GetObject”) access to

all objects (“*”) in the bucket.

The method returns the iam.PolicyStatement object, which can then be modified

as needed. For example, you can add a condition that will restrict access only

to an IPv4 range like this:

const statement = bucket.grantPublicAccess();

statement.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” });

Parameters:
  • keyPrefix (string (optional)) – the prefix of S3 object keys (e.g. home/*). Default is “*”.
  • *allowedActions (string) – the set of S3 actions to allow. Default is “s3:GetObject”.
Returns:

The iam.PolicyStatement object, which can be used to apply e.g. conditions.

Return type:

@aws-cdk/aws-iam.PolicyStatement

Abstract:

Yes

grantPut([identity[, objectsKeyPattern]])

Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.

If encryption is used, permission to use the key to encrypt the contents

of written files will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
Abstract:

Yes

grantRead([identity[, objectsKeyPattern]])

Grant read permissions for this bucket and it’s contents to an IAM

principal (Role/Group/User).

If encryption is used, permission to use the key to decrypt the contents

of the bucket will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
Abstract:

Yes

grantReadWrite([identity[, objectsKeyPattern]])

Grants read/write permissions for this bucket and it’s contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to use the key for

encrypt/decrypt will also be granted.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
Abstract:

Yes

grantWrite([identity[, objectsKeyPattern]])

Grant write permissions to this bucket to an IAM principal.

If encryption is used, permission to use the key to encrypt the contents

of written files will also be granted to the same principal.

Parameters:
  • identity (@aws-cdk/aws-iam.IPrincipal (optional)) – The principal
  • objectsKeyPattern (any (optional)) – Restrict the permission to a certain key pattern (default ‘*’)
Abstract:

Yes

onPutObject(name[, target[, path]]) → @aws-cdk/aws-events.EventRule

Defines a CloudWatch Event Rule that triggers upon putting an object into the Bucket.

Parameters:
  • name (string) – the logical ID of the newly created Event Rule
  • target (@aws-cdk/aws-events.IEventRuleTarget (optional)) – the optional target of the Event Rule
  • path (string (optional)) – the optional path inside the Bucket that will be watched for changes
Returns:

a new {@link events.EventRule} instance

Return type:

@aws-cdk/aws-events.EventRule

Abstract:

Yes

urlForObject([key]) → string

The https URL of an S3 object. For example:

Parameters:key (string (optional)) – The S3 key of the object. If not specified, the URL of the bucket is returned.
Returns:an ObjectS3Url token
Return type:string
Abstract:Yes
node

Inherited from @aws-cdk/cdk.IConstruct

The construct node in the scope tree.

Type:@aws-cdk/cdk.ConstructNode (readonly)
dependencyRoots

Inherited from @aws-cdk/cdk.IDependable

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)

LifecycleRule (interface)

class @aws-cdk/aws-s3.LifecycleRule

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.LifecycleRule;
// LifecycleRule is an interface
import { LifecycleRule } from '@aws-cdk/aws-s3';

Declaration of a Life cycle rule

abortIncompleteMultipartUploadAfterDays

Specifies a lifecycle rule that aborts incomplete multipart uploads to an Amazon S3 bucket.

The AbortIncompleteMultipartUpload property type creates a lifecycle

rule that aborts incomplete multipart uploads to an Amazon S3 bucket.

When Amazon S3 aborts a multipart upload, it deletes all parts

associated with the multipart upload.

Type:number (optional)
Default:Incomplete uploads are never aborted
enabled

Whether this rule is enabled.

Type:boolean (optional)
Default:true
expirationDate

Indicates when objects are deleted from Amazon S3 and Amazon Glacier.

The date value must be in ISO 8601 format. The time is always midnight UTC.

If you specify an expiration and transition time, you must use the same

time unit for both properties (either in days or by date). The

expiration time must also be later than the transition time.

Type:date (optional)
Default:No expiration date
expirationInDays

Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon Glacier.

If you specify an expiration and transition time, you must use the same

time unit for both properties (either in days or by date). The

expiration time must also be later than the transition time.

Type:number (optional)
Default:No expiration timeout
id

A unique identifier for this rule. The value cannot be more than 255 characters.

Type:string (optional)
noncurrentVersionExpirationInDays

Time between when a new version of the object is uploaded to the bucket and when old versions of the object expire.

For buckets with versioning enabled (or suspended), specifies the time,

in days, between when a new version of the object is uploaded to the

bucket and when old versions of the object expire. When object versions

expire, Amazon S3 permanently deletes them. If you specify a transition

and expiration time, the expiration time must be later than the

transition time.

Type:number (optional)
Default:No noncurrent version expiration
noncurrentVersionTransitions

One or more transition rules that specify when non-current objects transition to a specified storage class.

Only for for buckets with versioning enabled (or suspended).

If you specify a transition and expiration time, the expiration time

must be later than the transition time.

Type:NoncurrentVersionTransition[] (optional)
prefix

Object key prefix that identifies one or more objects to which this rule applies.

Type:string (optional)
Default:Rule applies to all objects
tagFilters

The TagFilter property type specifies tags to use to identify a subset of objects for an Amazon S3 bucket.

Type:string => any (optional)
Default:Rule applies to all objects
transitions

One or more transition rules that specify when an object transitions to a specified storage class.

If you specify an expiration and transition time, you must use the same

time unit for both properties (either in days or by date). The

expiration time must also be later than the transition time.

Type:Transition[] (optional)
Default:No transition rules

NoncurrentVersionTransition (interface)

class @aws-cdk/aws-s3.NoncurrentVersionTransition

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.NoncurrentVersionTransition;
// NoncurrentVersionTransition is an interface
import { NoncurrentVersionTransition } from '@aws-cdk/aws-s3';

Describes when noncurrent versions transition to a specified storage class.

storageClass

The storage class to which you want the object to transition.

Type:StorageClass
transitionInDays

Indicates the number of days after creation when objects are transitioned to the specified storage class.

Type:number
Default:No transition count.

NotificationKeyFilter (interface)

class @aws-cdk/aws-s3.NotificationKeyFilter

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.NotificationKeyFilter;
// NotificationKeyFilter is an interface
import { NotificationKeyFilter } from '@aws-cdk/aws-s3';
prefix

S3 keys must have the specified prefix.

Type:string (optional)
suffix

S3 keys must have the specified suffix.

Type:string (optional)

PipelineDeployAction

class @aws-cdk/aws-s3.PipelineDeployAction(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.PipelineDeployAction;
const { PipelineDeployAction } = require('@aws-cdk/aws-s3');
import { PipelineDeployAction } from '@aws-cdk/aws-s3';

Deploys the sourceArtifact to Amazon S3.

Extends:

@aws-cdk/aws-codepipeline-api.DeployAction

Parameters:
addInputArtifact([artifact]) → @aws-cdk/aws-codepipeline-api.Action

Inherited from @aws-cdk/aws-codepipeline-api.Action

Protected method

Parameters:artifact (@aws-cdk/aws-codepipeline-api.Artifact (optional)) –
Return type:@aws-cdk/aws-codepipeline-api.Action
addOutputArtifact([name]) → @aws-cdk/aws-codepipeline-api.Artifact

Inherited from @aws-cdk/aws-codepipeline-api.Action

Protected method

Parameters:name (string (optional)) –
Return type:@aws-cdk/aws-codepipeline-api.Artifact
onStateChange(name[, target[, options]]) → @aws-cdk/aws-events.EventRule

Inherited from @aws-cdk/aws-codepipeline-api.Action

Parameters:
Return type:

@aws-cdk/aws-events.EventRule

validate() → string[]

Inherited from @aws-cdk/aws-codepipeline-api.Action

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Return type:string[]
category

Inherited from @aws-cdk/aws-codepipeline-api.Action

The category of the action.

The category defines which action type the owner

(the entity that performs the action) performs.

Type:@aws-cdk/aws-codepipeline-api.ActionCategory (readonly)
owner

Inherited from @aws-cdk/aws-codepipeline-api.Action

Type:string (readonly)
provider

Inherited from @aws-cdk/aws-codepipeline-api.Action

The service provider that the action calls.

Type:string (readonly)
runOrder

Inherited from @aws-cdk/aws-codepipeline-api.Action

The order in which AWS CodePipeline runs this action.

For more information, see the AWS CodePipeline User Guide.

https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements

Type:number (readonly)
version

Inherited from @aws-cdk/aws-codepipeline-api.Action

Type:string (readonly)
configuration

Inherited from @aws-cdk/aws-codepipeline-api.Action

The action’s configuration. These are key-value pairs that specify input values for an action.

For more information, see the AWS CodePipeline User Guide.

http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements

Type:any (optional) (readonly)
region

Inherited from @aws-cdk/aws-codepipeline-api.Action

The AWS region the given Action resides in.

Note that a cross-region Pipeline requires replication buckets to function correctly.

You can provide their names with the {@link PipelineProps#crossRegionReplicationBuckets} property.

If you don’t, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,

that you will need to cdk deploy before deploying the main, Pipeline-containing Stack.

Type:string (optional) (readonly)
Default:the Action resides in the same region as the Pipeline
role

Inherited from @aws-cdk/aws-codepipeline-api.Action

The service role that is assumed during execution of action.

This role is not mandatory, however more advanced configuration

may require specifying it.

Type:@aws-cdk/aws-iam.IRole (optional) (readonly)
apply(aspect)

Inherited from @aws-cdk/cdk.Construct

Applies the aspect to this Constructs node

Parameters:aspect (@aws-cdk/cdk.IAspect) –
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

PipelineDeployActionProps (interface)

class @aws-cdk/aws-s3.PipelineDeployActionProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.PipelineDeployActionProps;
// PipelineDeployActionProps is an interface
import { PipelineDeployActionProps } from '@aws-cdk/aws-s3';

Construction properties of the {@link PipelineDeployAction S3 deploy Action}.

Extends:CommonPipelineDeployActionProps
Extends:@aws-cdk/aws-codepipeline-api.CommonActionConstructProps
bucket

The Amazon S3 bucket that is the deploy target.

Type:IBucket
stage

Inherited from @aws-cdk/aws-codepipeline-api.CommonActionConstructProps

The Pipeline Stage to add this Action to.

Type:@aws-cdk/aws-codepipeline-api.IStage
runOrder

Inherited from @aws-cdk/aws-codepipeline-api.CommonActionProps

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.

Type:number (optional)
Default:1
extract

Inherited from @aws-cdk/aws-s3.CommonPipelineDeployActionProps

Should the deploy action extract the artifact before deploying to Amazon S3.

Type:boolean (optional)
Default:true
inputArtifact

Inherited from @aws-cdk/aws-s3.CommonPipelineDeployActionProps

The inputArtifact to deploy to Amazon S3.

Type:@aws-cdk/aws-codepipeline-api.Artifact (optional)
objectKey

Inherited from @aws-cdk/aws-s3.CommonPipelineDeployActionProps

The key of the target object. This is required if extract is false.

Type:string (optional)

PipelineSourceAction

class @aws-cdk/aws-s3.PipelineSourceAction(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.PipelineSourceAction;
const { PipelineSourceAction } = require('@aws-cdk/aws-s3');
import { PipelineSourceAction } from '@aws-cdk/aws-s3';

Source that is provided by a specific Amazon S3 object.

Extends:

@aws-cdk/aws-codepipeline-api.SourceAction

Parameters:
addInputArtifact([artifact]) → @aws-cdk/aws-codepipeline-api.Action

Inherited from @aws-cdk/aws-codepipeline-api.Action

Protected method

Parameters:artifact (@aws-cdk/aws-codepipeline-api.Artifact (optional)) –
Return type:@aws-cdk/aws-codepipeline-api.Action
addOutputArtifact([name]) → @aws-cdk/aws-codepipeline-api.Artifact

Inherited from @aws-cdk/aws-codepipeline-api.Action

Protected method

Parameters:name (string (optional)) –
Return type:@aws-cdk/aws-codepipeline-api.Artifact
onStateChange(name[, target[, options]]) → @aws-cdk/aws-events.EventRule

Inherited from @aws-cdk/aws-codepipeline-api.Action

Parameters:
Return type:

@aws-cdk/aws-events.EventRule

validate() → string[]

Inherited from @aws-cdk/aws-codepipeline-api.Action

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Return type:string[]
category

Inherited from @aws-cdk/aws-codepipeline-api.Action

The category of the action.

The category defines which action type the owner

(the entity that performs the action) performs.

Type:@aws-cdk/aws-codepipeline-api.ActionCategory (readonly)
owner

Inherited from @aws-cdk/aws-codepipeline-api.Action

Type:string (readonly)
provider

Inherited from @aws-cdk/aws-codepipeline-api.Action

The service provider that the action calls.

Type:string (readonly)
runOrder

Inherited from @aws-cdk/aws-codepipeline-api.Action

The order in which AWS CodePipeline runs this action.

For more information, see the AWS CodePipeline User Guide.

https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements

Type:number (readonly)
version

Inherited from @aws-cdk/aws-codepipeline-api.Action

Type:string (readonly)
configuration

Inherited from @aws-cdk/aws-codepipeline-api.Action

The action’s configuration. These are key-value pairs that specify input values for an action.

For more information, see the AWS CodePipeline User Guide.

http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements

Type:any (optional) (readonly)
region

Inherited from @aws-cdk/aws-codepipeline-api.Action

The AWS region the given Action resides in.

Note that a cross-region Pipeline requires replication buckets to function correctly.

You can provide their names with the {@link PipelineProps#crossRegionReplicationBuckets} property.

If you don’t, the CodePipeline Construct will create new Stacks in your CDK app containing those buckets,

that you will need to cdk deploy before deploying the main, Pipeline-containing Stack.

Type:string (optional) (readonly)
Default:the Action resides in the same region as the Pipeline
role

Inherited from @aws-cdk/aws-codepipeline-api.Action

The service role that is assumed during execution of action.

This role is not mandatory, however more advanced configuration

may require specifying it.

Type:@aws-cdk/aws-iam.IRole (optional) (readonly)
outputArtifact

Inherited from @aws-cdk/aws-codepipeline-api.SourceAction

Type:@aws-cdk/aws-codepipeline-api.Artifact (readonly)
apply(aspect)

Inherited from @aws-cdk/cdk.Construct

Applies the aspect to this Constructs node

Parameters:aspect (@aws-cdk/cdk.IAspect) –
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

PipelineSourceActionProps (interface)

class @aws-cdk/aws-s3.PipelineSourceActionProps

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.PipelineSourceActionProps;
// PipelineSourceActionProps is an interface
import { PipelineSourceActionProps } from '@aws-cdk/aws-s3';

Construction properties of the {@link PipelineSourceAction S3 source Action}.

Extends:CommonPipelineSourceActionProps
Extends:@aws-cdk/aws-codepipeline-api.CommonActionConstructProps
bucket

The Amazon S3 bucket that stores the source code

Type:IBucket
stage

Inherited from @aws-cdk/aws-codepipeline-api.CommonActionConstructProps

The Pipeline Stage to add this Action to.

Type:@aws-cdk/aws-codepipeline-api.IStage
runOrder

Inherited from @aws-cdk/aws-codepipeline-api.CommonActionProps

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.

Type:number (optional)
Default:1
bucketKey

Inherited from @aws-cdk/aws-s3.CommonPipelineSourceActionProps

The key within the S3 bucket that stores the source code.

Type:string
outputArtifactName

Inherited from @aws-cdk/aws-s3.CommonPipelineSourceActionProps

The name of the source’s output artifact. Output artifacts are used by CodePipeline as

inputs into other actions.

Type:string (optional)
Default:a name will be auto-generated
pollForSourceChanges

Inherited from @aws-cdk/aws-s3.CommonPipelineSourceActionProps

Whether AWS CodePipeline should poll for source changes.

If this is false, the Pipeline will use CloudWatch Events to detect source changes instead.

Note that if this is false, you need to make sure to include the source Bucket in a CloudTrail Trail,

as otherwise the CloudWatch Events will not be emitted.

Type:boolean (optional)
Default:true

StorageClass (enum)

class @aws-cdk/aws-s3.StorageClass

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.StorageClass;
const { StorageClass } = require('@aws-cdk/aws-s3');
import { StorageClass } from '@aws-cdk/aws-s3';

Storage class to move an object to

InfrequentAccess

Storage class for data that is accessed less frequently, but requires rapid access when needed.

Has lower availability than Standard storage.

OneZoneInfrequentAccess

Infrequent Access that’s only stored in one availability zone.

Has lower availability than standard InfrequentAccess.

Glacier

Storage class for long-term archival that can take between minutes and hours to access.

Transition (interface)

class @aws-cdk/aws-s3.Transition

Language-specific names:

using Amazon.CDK.AWS.S3;
import software.amazon.awscdk.services.s3.Transition;
// Transition is an interface
import { Transition } from '@aws-cdk/aws-s3';

Describes when an object transitions to a specified storage class.

storageClass

The storage class to which you want the object to transition.

Type:StorageClass
transitionDate

Indicates when objects are transitioned to the specified storage class.

The date value must be in ISO 8601 format. The time is always midnight UTC.

Type:date (optional)
Default:No transition date.
transitionInDays

Indicates the number of days after creation when objects are transitioned to the specified storage class.

Type:number (optional)
Default:No transition count.