Skip to content

aws-s3-deployment v2.207: BucketDeployment broken for SSM StringListParameter source. #35145

@asgard-bot

Description

@asgard-bot

Describe the bug

Previously, we worked around #22843 via SSM parameters, like:

stack 1:

const subnetIds = ourVpc.publicSubnets.map((subnet) => subnet.subnetId);
    new StringListParameter(this, `subnetIds-${props.env.account}-${props.env.region}`, {
      parameterName: subnetIdsParamName,
      stringListValue: subnetIds,
    });

stack 2:

    const subnetIdsParam = StringListParameter.fromStringListParameterName(
      this,
      `subnetIdsRead-${props.env.account}-${props.env.region}`,
      props.subnetIdsParamName,
    );

then. we'd reference subnetIdsParam.stringListValue in Source.jsonData.

However, as of version 2.207, this behavior is broken. While the SSM parameter is stored correctly, it is not resolved before the stack 2 template is deployed (token value is deployed in place of real value).

I believe this pattern may have been broken by #34916, which ironically solves the issue that prompted our use of the workaround.

Contact: [email protected]

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

2.206.0

Expected Behavior

SSM parameter resolved in stack 2 and stored in json object via BucketDeployment.

Current Behavior

SSM parameter was not resolved (Token string deployed instead).

Reproduction Steps

  • Create SSM stringlist parameter as shown above (string parameter appears to work).

  • Create source.jsondata in another stack from stringlist parameter as show above.

  • Create a bucket deployment that uses this json data included in the sources list.

  • Deploy the stacks. Observe the value deployed in the bucket.

Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.207.0

AWS CDK CLI version

2.1023.0

Node.js Version

18

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-s3-deploymentbugThis issue is a bug.effort/mediumMedium work item – several days of effortp0potential-regressionMarking this issue as a potential regression to be checked by team member

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions