Error when deploying Lambda Docker using AWS CDK

2.3k Views Asked by At

I'm following https://sbstjn.com/blog/aws-cdk-lambda-docker-container-example/ and deploying Lambda Docker using AWS CDK. On 'cdk deploy' I get the following error. Link to my github repo is https://github.com/aqilzeeshan/cdk_dockerlambda

Can anyone tell me please what is the problem ? Thanks

Do you wish to deploy these changes (y/n)? y
CdkLambdaDockerStack: deploying...
[0%] start: Publishing dcfb2f152c6c0b2ca779c90dee5d59d3b510805a3ed884b310200624e32a4b27:current
Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:156:25)
    at writeGeneric (internal/stream_base_commons.js:147:3)
    at Socket._writeGeneric (net.js:785:11)
    at Socket._write (net.js:797:8)
    at writeOrBuffer (internal/streams/writable.js:358:12)
    at Socket.Writable.write (internal/streams/writable.js:303:10)
    at C:\Users\amuham210\AppData\Roaming\npm\node_modules\aws-cdk\node_modules\cdk-assets\lib\private\shell.ts:28:19
    at new Promise (<anonymous>)
    at Object.shell (C:\Users\amuham210\AppData\Roaming\npm\node_modules\aws-cdk\node_modules\cdk-assets\lib\private\shell.ts:26:10)
    at Docker.execute (C:\Users\amuham210\AppData\Roaming\npm\node_modules\aws-cdk\node_modules\cdk-assets\lib\private\docker.ts:75:13)
1

There are 1 best solutions below

0
On

I found the problem. Docker needs to be installed to build the image. After installing docker on machine where I run 'cdk deploy' above issue is resolved.