aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.33k stars 3.76k forks source link

feat(cloudfront): find and replace text in the code of CloudFront Functions during synth #30621

Open SydneyUni-Jim opened 6 days ago

SydneyUni-Jim commented 6 days ago

Issue # (if applicable)

Closes #30492

Reason for this change

Primarily to allow deploying a CloudFront Function and its Key/Value Store in the same stack, without having to deploy the Key/Value Store first, manually retrieve its ID, and then hardcode the ID into the Function's code.

Secondarily to allow other values in a CloudFront Function's code to be changed when deploying into different environments, dev verses prod for example.

Description of changes

Backwards compatible API changes

Description of how you validated changes

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

aws-cdk-automation commented 6 days ago

AWS CodeBuild CI Report

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

SydneyUni-Jim commented 5 days ago

In the last PR Linter / validate-pr, node core dumped from a bus error. The prior validate-pr had succeeded.

[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error /home/runner/work/aws-cdk/aws-cdk/node_modules/@lerna/create/node_modules/nx, /home/runner/work/aws-cdk/aws-cdk/node_modules/@nx/devkit/node_modules/nx, /home/runner/work/aws-cdk/aws-cdk/node_modules/lerna/node_modules/nx: Command failed.
Exit code: 135
Command: node ./bin/post-install
Arguments: 
Directory: /home/runner/work/aws-cdk/aws-cdk/node_modules/@nx/devkit/node_modules/nx
Output:
Bus error (core dumped)
Error: Process completed with exit code 135.