# S3DeployActionProps

Construction properties of the `S3DeployAction S3 deploy Action`.

Extends: S3DeployActionProps
Extends: CommonAwsActionProps
Used as props by: S3DeployAction

- Source: [`aws-codepipeline-actions/lib/s3/deploy-action.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codepipeline-actions/lib/s3/deploy-action.ts#L61)
- Type last changed: v2.80.0 · 20 May 2023

## 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

- `accessControl`: [BucketAccessControl](/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketAccessControl.html) — 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.

- `actionName`: string (required) — The physical, human-readable name of the Action.

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

- `bucket`: [IBucket](/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html) (required) — The Amazon S3 bucket that is the deploy target.

- `cacheControl`: [CacheControl](/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.CacheControl.html)[] — 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).

- `encryptionKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) = none — The AWS KMS encryption key for the host bucket.

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

- `extract`: boolean = true — Should the deploy action extract the artifact before deploying to Amazon S3.

- `input`: [Artifact](/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.Artifact.html) (required) — The input Artifact to deploy to Amazon S3.

- `objectKey`: string — The key of the target object.

  This is required if extract is false.

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The Role in which context's this Action will be executing in.

  **Default:** a new Role will be generated

  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.

- `runOrder`: number = 1 — The runOrder property for this Action.

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

- `variablesNamespace`: 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
