Skip to content

aws-cdk-lib/aws-codepipeline-actions: S3DeployActionProps is missing KMSEncryptionKeyARN #22266

@KSSLR

Description

@KSSLR

Describe the bug

The S3 deploy action supports a KMS encryption key that the action uses to encrypt objects uploaded to a bucket. The CloudFormation resource Action inside a Stage inside a AWS::CodePipeline::Pipeline carries a configuration property "KMSEncryptionKeyARN" that indicates the KMS key to use (https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-S3Deploy.html). This property is missing in aws-cdk-lib » aws_codepipeline_actions » S3DeployActionProps (https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.S3DeployActionProps.html).

Expected Behavior

I expected the S3DeployActionProps interface to have a KMSEncryptionKeyARN and the S3DeployAction class to emit this property to the CloudFormation template.

Current Behavior

Neither S3DeployActionProps nor S3DeployActionProps support KMSEncryptionKeyARN

Reproduction Steps

const deployAction = new S3DeployAction({ actionName: 'SomeActionName', input: codePipelineArtifact, bucket: s3BucketWithEncryption, role: deploymentRole }

Possible Solution

In S3DeployActionProps:
readonly kmsEncryptionKeyArn?: string;

In S3DeployAction
return { configuration: { BucketName: this.props.bucket.bucketName, Extract: this.props.extract === false ? 'false' : 'true', ObjectKey: this.props.objectKey, CannedACL: acl ? toKebabCase(acl.toString()) : undefined, CacheControl: this.props.cacheControl && this.props.cacheControl.map(ac => ac.value).join(', '), KMSEncryptionKeyARN: this.props.kmsEncryptionKeyArn },

Additional Information/Context

No response

CDK CLI Version

2.24.1

Framework Version

No response

Node.js Version

18.7.0

OS

macOS Monterey 12.6

Language

Typescript

Language Version

4.4.4

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-s3Related to Amazon S3effort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions