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)
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.
Related
I have a project with CDK and CDK Deploy does not work. My project is a simple CDK app that has been started with cdk init app --language typescript and was working at first. I don't have anything but a lambda and an api gateway in this project.
After adding NodejsFunction from #aws-cdk/aws-lambda-nodejs I faced some errors but by installing docker locally and some changes all those were resolved and synth completes successfully now.
I run cdk bootstrap and then cdk synth and then cdk deploy with the last one here is the error I see: (the rest finishes successfully)
SSM parameter /cdk-bootstrap/pipeline/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
bootstrap and synth work fine, my aws configure has been done and no errors anywhere but the deploy doesn't work.
More details:
Error:
MyStackNameStack failed: Error: MyStackNameStack: SSM parameter /cdk-bootstrap/pipeline/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
at CloudFormationDeployments.validateBootstrapStackVersion (/usr/local/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:297:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at CloudFormationDeployments.publishStackAssets (/usr/local/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:272:7)
at CloudFormationDeployments.deployStack (/usr/local/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:179:5)
at CdkToolkit.deploy (/usr/local/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:184:24)
at initCommandLine (/usr/local/lib/node_modules/aws-cdk/bin/cdk.ts:213:9)
MyStackNameStack: SSM parameter /cdk-bootstrap/pipeline/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Package.json and CLI versions:
CDK version: 1.116.0
"#aws-cdk/aws-apigateway": "^1.116.0",
"#aws-cdk/aws-lambda": "^1.116.0",
"#aws-cdk/aws-lambda-nodejs": "^1.116.0",
"#aws-cdk/core": "^1.116.0",
I only use this:
cdk bootstrap
I am trying to run this buildpack: https://github.com/heroku/heroku-buildpack-nginx locally in a docker container following the tutorial.
When I try to execute the second command after make shell I get this error:
$ make shell
$ cp bin/nginx-$STACK bin/nginx
$ FORCE=1 bin/start-nginx
cp: cannot stat 'bin/nginx-heroku-18': No such file or directory
I want to be able to start nginx buildpack to test it locally, but I am stuck at this error. Could someone help me please ? Thank you
You could use it with the pack CLI by following this tutorial on Using Heroku Buildpacks with Pack
Pack uses a newer version of the buildpack API, but the tutorial describes how to use an old buildpack with a shim so that it works.
I'm trying to get the CircleCI CLI tool ( https://circleci.com/docs/2.0/local-jobs/ ) working on Ubuntu WSL on Windows 10. It appeared to install successfully -- and the file permissions appear to be correct. I have Docker for Windows installed and running, and the Linux Docker client works without issue.
But now it always errors when trying to validate a CircleCI config file.
I have tried:
circleci config validate -c .circleci/config.yml
and
circleci config validate
from the root of my repo.
But each time, it gives the error:
Error: open .circleci/config.yml: no such file or directory
Has anyone been able to get this work?
sudo worked for me to overcome this. However, I stuck with the next error.
I am trying to setup TensorFlow Serving using Docker on a Windows machine by following the instructions from https://tensorflow.github.io/serving/docker.html
I have successfully built and run the container and cloned the TensorFlow servings sub-modules. However, while running the command
"bazel test tensorflow_serving/..." the error
Linking of rule: '//tensorflow_serving/batching/test_util:puppet_batch_scheduler_test' failed:gcc failed: error executing command /usr/bin/gcc .... is displayed
The complete stack trace is shown in the below image.
Any help is appreciated.
I don't know how to solve the problem directly, but a workaround could be pulling a docker image where the TF Serving is already compiled such as this one.
I am getting this error when the deploy to GAE (RoR) is finished:
latest: digest: sha256:fae8a83d8a4503b9ca284ecfb70da5faf1b66b015804396c2282fae7fc5e4669 size: 75429
DONE
-----------------------------------------------------------------------------------------------------------------------------------------
Updating service [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [13] The system encountered a fatal error
I have no idea what happens.
I checked the logs, and last register is about the docker build:
17:13:24.410
DONE
{
metadata:
{…}
textPayload:
"DONE"
insertId:
"271f3953-7ca6-4282-960a-fcb35a2261a2-316"
log:
"cloudbuild"
}
The application is running in development and production enviroment whitout errors.
Rails : 4.2.6
Ruby: 2.3.1
GCloud SDK: 108.0.0
Someone knows how to fix it?
Very thanks!
Temporally solve:
Just add --docker-build=remote option to you gcloud preview app deploy command. (Remote builds are working normally)
To debug the command use --verbosity debug option.
EDIT:
Response from google support:
Engineering is aware of an issue with the platform that would cause these errors. They are currently working on deploying a fix.