CDK-SPA-Deploy
CDK-SPA-Deploy copied to clipboard
The s3 sync error during Custom::CDKBucketDeployment
Hi! I'm using version 1.89 and I'll try with the latest one in a bit, but in the meantime, here is the issue:
Here is how I create my deployment
const spaDeployment = new SPADeploy(this, 'WebappDeployment')
.createSiteWithCloudfront({
indexDoc: 'index.html',
websiteFolder: resolvePath(__dirname,'../../../../dist/apps/web-app/en-AU'),
certificateARN: this.props.CDNProjectCertificateARN,
cfAliases: [this.props.webappHostname]
});
And the error I'm getting
Failed to create resource. Command '['/opt/awscli/aws', 's3', 'sync', '--delete', '/tmp/tmpoa6yhjsb/contents', 's3://feature-lxp-343-features-webappdeploymentwebsiteb-114do55b79y8j
/']' died with <Signals.SIGKILL: 9>.
I think it could be related to #13292 in aws-cdk.
The amount of memory to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket probably exceeds 128mb. This can be increased by setting memoryLimit
on the BucketDeployment
.
More background info can be found in this thread: https://github.com/aws/aws-cdk/issues/4058 Opened a pull request to add the functionality to CDK-SPA-Deploy: https://github.com/nideveloper/CDK-SPA-Deploy/pull/284
Is this PR going to be integrated any time soon?