- Newest
- Most votes
- Most comments
This error message indicates a memory issue during the CDK deployment process. The "ENOMEM" error code specifically refers to "not enough memory" when trying to establish a connection to the AWS CloudFormation service.
While you mention having enough RAM available on your system, there are several potential causes and solutions to consider:
-
CloudFormation stack status: Since your CloudFormation stack is stuck in "CREATE_IN_PROGRESS" status, it's possible that a resource is taking longer than expected to create or has failed but hasn't properly reported back. This can cause the CDK CLI to wait indefinitely and potentially consume memory.
-
Network connection issues: The error shows it's trying to connect to an AWS endpoint (44.216.188.38:443). Network issues or proxy configurations might be contributing to the problem.
-
Node.js memory limitations: By default, Node.js has memory limitations that might be reached during complex CDK deployments. You can try increasing the Node.js memory limit by setting an environment variable before running your deployment:
export NODE_OPTIONS=--max_old_space_size=4096
(This sets the limit to 4GB, adjust as needed)
- CDK deployment options: You could try using the
--no-rollbackflag with your deployment to prevent automatic rollback if a resource fails to create:
cdk deploy --no-rollback {stack-name}
-
Check CloudFormation logs: If a specific resource is failing to create, you might find more details in the CloudFormation events for your stack in the AWS Console.
-
Break up your stack: If your stack is very large or complex, consider breaking it into smaller, more manageable stacks.
If the issue persists, you might need to manually delete the stack from the AWS CloudFormation console and try deploying again, possibly with a simplified version of your stack to identify the problematic resource.
Sources
Troubleshooting cluster deployment issues - AWS ParallelCluster
Community | Bootstrapping an Amazon EC2 Instance Using User-data to Run a Python Web App
Hello.
I have found cases where errors are occurring due to problems with software installed on the PC.
Just to be on the safe side, please check that there is no security software, proxy software, or other software on your PC interfering with the operation of CDK.
https://github.com/aws/aws-cdk/discussions/32870
