Skip to content
v2.274.0

S3DeployActionProps Struct ​

Construction properties of the S3DeployAction S3 deploy Action.

Example ​

ts
declare const sourceArtifact: codepipeline.Artifact;
declare const outputArtifact: codepipeline.Artifact;

const commandsAction = new codepipeline_actions.CommandsAction({
  actionName: 'Commands',
  commands: [
    'export MY_OUTPUT=my-key',
  ],
  input: sourceArtifact,
  output: outputArtifact,
  outputVariables: ['MY_OUTPUT', 'CODEBUILD_BUILD_ID'], // CODEBUILD_BUILD_ID is a variable defined by CodeBuild
});

// Deploy action
const deployAction = new codepipeline_actions.S3DeployAction({
  actionName: 'DeployAction',
  extract: true,
  input: outputArtifact,
  bucket: new s3.Bucket(this, 'DeployBucket'),
  objectKey: commandsAction.variable('MY_OUTPUT'), // the variable emitted by the Commands action
});

Properties ​

accessControloptionalBucketAccessControlaccess_controloptionalBucketAccessControlaccessControloptionalBucketAccessControlAccessControloptionalBucketAccessControlAccessControloptionalBucketAccessControl#
The specified canned ACL to objects deployed to Amazon S3.

Default: the original object ACL

This overwrites any existing ACL that was applied to the object.

actionNamestringaction_namestractionNameStringActionNamestringActionName*stringrequired#
The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.

bucketIBucketbucketIBucketbucketIBucketBucketIBucketBucketIBucketrequired#
The Amazon S3 bucket that is the deploy target.
cacheControloptionalCacheControl[]cache_controloptionaltyping.List[CacheControl]cacheControloptionalList<CacheControl>CacheControloptionalCacheControl[]CacheControloptional*[]CacheControl#
The caching behavior for requests/responses for objects in the bucket.

Default: none, decided by the HTTP client

The final cache control property will be the result of joining all of the provided array elements with a comma (plus a space after the comma).

encryptionKeyoptionalIKeyencryption_keyoptionalIKeyencryptionKeyoptionalIKeyEncryptionKeyoptionalIKeyEncryptionKeyoptionalIKey= none#
The AWS KMS encryption key for the host bucket.

The encryptionKey parameter encrypts uploaded artifacts with the provided AWS KMS key.

extractoptionalbooleanextractoptionalboolextractoptionalBooleanExtractoptionalboolExtractoptional*bool= true#
Should the deploy action extract the artifact before deploying to Amazon S3.
inputArtifactinputArtifactinputArtifactInputArtifactInputArtifactrequired#
The input Artifact to deploy to Amazon S3.
objectKeyoptionalstringobject_keyoptionalstrobjectKeyoptionalStringObjectKeyoptionalstringObjectKeyoptional*string#
The key of the target object.

This is required if extract is false.

roleoptionalIRoleroleoptionalIRoleroleoptionalIRoleRoleoptionalIRoleRoleoptionalIRole#
The Role in which context's this Action will be executing in.

Default: a new Role will be generated

notes

The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.

runOrderoptionalnumberrun_orderoptionalint | floatrunOrderoptionalNumberRunOrderoptionaldoubleRunOrderoptional*float64= 1#
The runOrder property for this Action.

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

variablesNamespaceoptionalstringvariables_namespaceoptionalstrvariablesNamespaceoptionalStringVariablesNamespaceoptionalstringVariablesNamespaceoptional*string#
The name of the namespace to use for variables emitted by this action.

Default: a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set