Skip to content

Commit 54c01cb

Browse files
authored
feat(s3-deployment): added property outputObjectKeys for BucketDeployment (#31452)
### Issue # (if applicable) Closes #28579 ### Reason for this change The [CR lambda](https://github.com/aws/aws-cdk/blob/597228c1552a21f8dc7250a0be62160f838bb776/packages/%40aws-cdk/custom-resource-handlers/lib/aws-s3-deployment/bucket-deployment-handler/index.py#L138C14-L138C30) is essentially sending back the same data in the response which is hitting the limit for close to 50 object uploads. Particularly this is being a limitation when using servicecatalog.ProductStack, if there are local assets beyond a particular number, the Custom::CDKBucketDeployment would fail with the error Response object is too long which is a hard limit of 4096 bytes. ### Description of changes 1. Added a new property to control the custom resource sending large data and hitting the 4096 bytes limit even though the deployment operation is successful. 2. The property `outputObjectKeys` has been set to false by default for the service catalog product so that the error does not occur. ### Description of how you validated changes Validated using a sample stack with the property set and confirmed the behavior. Also, the existing deployments would be unaffected. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 8318e79 commit 54c01cb

File tree

308 files changed

+118863
-80153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+118863
-80153
lines changed

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
# Set the default behavior, in case people don't have core.autocrlf set.
22
* text=auto
3-
43
# Currently, this repository has LF dependencies in building and testing, with json, sh, and no extensions.
54
# Until this is fixed, it is best to just set the whole repository to be LF.
65
* eol=lf
7-
86
*.gif binary
97
*.zip binary
108
*.png binary
119
*.jpg binary
1210
*.tgz binary
1311
*.tar.gz binary
14-
1512
# Hide snapshots from GitHub UI, except for the actual templates
1613
**/*.snapshot/** linguist-generated
1714
**/*.snapshot/**/*.template.json -linguist-generated
1815
**/*.snapshot/**/*DeployAssert*.template.json linguist-generated
16+
packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-big-response.js.snapshot/asset.3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip filter=lfs diff=lfs merge=lfs -text

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/appconfigconfigurationDefaultTestDeployAssert6752CD38.assets.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/aws-appconfig-configuration.assets.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/aws-appconfig-configuration.template.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@
780780
"Ref": "MyBucketF68F3FF0"
781781
},
782782
"RetainOnDelete": false,
783-
"Prune": true
783+
"Prune": true,
784+
"OutputObjectKeys": true
784785
},
785786
"UpdateReplacePolicy": "Delete",
786787
"DeletionPolicy": "Delete"
@@ -917,7 +918,7 @@
917918
"S3Bucket": {
918919
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
919920
},
920-
"S3Key": "0158f40002a8c211635388a87874fd4dcc3d68f525fe08a0fe0f014069ae539c.zip"
921+
"S3Key": "c6358465bf49dfae556bb430bf9c81fa578c221b82c308e3707901b1dd654762.zip"
921922
},
922923
"Environment": {
923924
"Variables": {

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/cdk.out

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/integ.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/manifest.json

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/tree.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)