-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-service-catalog): SIGKILL: 9 CustomCDKBucketDeployment Lambda runs out of memory #29862
(aws-service-catalog): SIGKILL: 9 CustomCDKBucketDeployment Lambda runs out of memory #29862
Comments
Btw. Increasing the memory limit of the Lambda manually fixes the problem for the time being. |
I don't think increasing the memory allocated to the Lambda is the correct solution here. It's a waste of resources and would not scale with larger file sizes. The file downloaded from S3 should not be fully stored in memory until its download is completed, it should be progressively saved to disk and assembled. I don't think this is possible with the AWS CLI, but it might be doable with boto3, see Multipart transfers. If not, it could be done with the SDK, see Upload or download large files to and from Amazon S3 using an AWS SDK EDIT: boto3 should be good to go, and a lot simpler than re-implementing the same behavior with the SDK, see docs
|
@nmussy Thank you and I agree with you. But it makes sense to expose the memoryLimit as well. Feel free and welcome to submit a PR to expose the memoryLimit for this. Please help us prioritize with 👍 . |
I've opened another issue for my solution, so we can keep track of it after this one is fixed by the |
### Issue # (if applicable) Closes #29862 ### Reason for this change Exposes `BucketDeployment`'s `memoryLimit` prop in the `ProductStack` class. While not an ideal solution, this allows users to handle larger files ### Description of changes * Added `memoryLimit` to `ProductStackProps` and the internal `ProductStackSynthesizerProps` ### Description of how you validated changes Updated unit and integ tests ### 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*
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
Expected Behavior
I should be able to configure the memory limit for the bucket deployment Lambda used by the
ProductStackSynthesizer
.Current Behavior
It is not configurable since it is hard-coded deep in the synthesizer:
aws-cdk/packages/aws-cdk-lib/aws-servicecatalog/lib/private/product-stack-synthesizer.ts
Line 85 in 8e2cbae
Reproduction Steps
You need to try to deploy a big enough CDK Stack using service catalog product stacks.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.134.0 (build 265d769)
Framework Version
No response
Node.js Version
v18.20.0
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: