I am deploying changes to AWS console throuhg the command
cdk deploy --all
Previously it worked well and created the stack on AWS console but now after creating another stack when I tried to run the same command cdk deploy all rather than deploying code to AWS it shows just following four statements
Usage:
cdk [-vbo] [--toc] [--notransition] [--logo=<logo>] [--theme=<theme>] [--custom-css=<cssfile>] FILE
cdk --install-theme=<theme>
cdk --default-theme=<theme>
cdk --generate=<name>
Something changed in your environment and now cdk is pointing to the Courseware Development Kit instead of the aws-cdk.
You can confirm this by studying the output of which cdk.
To fix this, uninstall Courseware Development Kit or create a shell alias for it (after putting it further down in your $PATH).
Also, cdk deploy all is not the right command - you're looking for cdk deploy --all.
Related
I want to use this repo and I have created and activated a virtualenv and installed the required dependencies.
I get an error when I run pytest.
And under the file binance_cdk/app.py it describes the following tasks:
App (PSVM method) entry point of the program.
Note:
Steps tp setup CDK:
install npm
cdk -init (creates an empty project)
Add in your infrastructure code.
Run CDK synth
CDK bootstrap <aws_account>/
Run CDK deploy ---> This creates a cloudformation .yml file and the aws resources will be created as per the mentioned stack.
I'm stuck on step 3, what do I add in this infrastructure code, and if I want to use this on amazon sagemaker which I am not familiar with, do I even bother doing this on my local terminal, or do I do the whole process regardless on sagemaker?
Thank you in advance for your time and answers !
The infrastructure code is the Python code that you want to write for the resources you want to provision with SageMaker. In the example you provided for example the infra code they have is creating a Lambda function. You can do this locally on your machine, the question is what do you want to achieve with SageMaker? If you want to create an endpoint then following the CDK Python docs with SageMaker to identify the steps for creating an endpoint. Here's two guides, the first is an introduction to the AWS CDK and getting started. The second is an example of using the CDK with SageMaker to create an endpoint for inference.
CDK Python Starter: https://towardsdatascience.com/build-your-first-aws-cdk-project-18b1fee2ed2d
CDK SageMaker Example: https://github.com/philschmid/cdk-samples/tree/master/sagemaker-serverless-huggingface-endpoint
Hello I'm having this problem when trying to deploy a django application to aws, the app runs perfectly locally but when trying to deploy to aws this error shows up.
like this
I tried to install that manually, but it doesn't work that way.
If the docker version for your deployment runner is 20.x - it's probably this https://github.com/docker/compose/issues/8105
Try pinning the deploy docker version to 19.03.13ce-1
I am using Node.js version 14.15.1 on my Mac. I installed the AWS CDK using
sudo npm install -g aws-cdk
When I check my cdk version, the output is just "cdk" without telling me the version
% cdk --version
cdk
When I try to initialize a sample app in python, I get this result rather than the expected result in the tutorial I am following.
% cdk init sample-app --language python
Usage:
cdk [-vbo] [--toc] [--notransition] [--logo=<logo>] [--theme=<theme>] [--custom-css=<cssfile>] FILE
cdk --install-theme=<theme>
cdk --default-theme=<theme>
cdk --generate=<name>
Likely there is something else called cdk ahead of the nodejs aws-cdk package in your path. You can use the which command to figure out what path is actually being called when you run cdk. On my system, the nodejs aws-cdk package gets installed to /usr/local/bin/cdk.
Try running which cdk and if you find that your shell tells you it's running a different cdk binary, uninstall whatever that package is and retry.
I have created a Django application which is deployed to AWS using Zappa in a CI/CD pipeline using the following commands:
- zappa update $ENVIRONMENT
- zappa manage $ENVIRONMENT "collectstatic --noinput"
- zappa manage $ENVIRONMENT "migrate"
However I want to add a test step to the CI/CD pipeline that would test the application much like in a way that I would test the application locally using the Django command:
python manage.py test
Is there a way to issue a zappa command to make run the "python manage.py test"? Do you have any suggestion?
Here is the docs that have a docker setup that you can use for local testing (Docs here)
Also, this post from Ian Whitestone(a core Zappa contributor) uses the official AWS docker image for the same job. And he has given one example for local testing also (Blog post)
I am trying to figure out how to deploy a flask application that I have received with a Dockerfile to AWS Lambda.
In local, all I have to do to start the app is to enter docker-compose up. That's work great.
But I don't know how to deploy this environment to AWS Lambda and tell it to run docker-compose upto launch the app.
Any help will be highly appreciated. Thanks.
It is not possible to use a docker image with aws lambda. Lambda is supposed to execute function or code snippets in different possible programming languages.
You should use AWS ECS to run docker container from images.