from webcast
The cdk.json file tells the CDK Toolkit how to execute your app.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilecdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template
- NOTE: make sure you have run
aws configureand are setup in the correct aws account you want to deploy to - NOTE: leaving this running for any amount of time will create charges on your AWS bill
cdk deploy NodeDemoAwsStackdeploy the ledger and node cluster- create a ledger:
curl --location --request POST 'http://[load balancer url]/api/db/[ledger name]/new_ledger' --header 'Content-Type: application/json' - i.e.
curl --location --request POST 'NodeD-NodeF-MFIO5M9JPL04-1306336054.us-east-1.elb.amazonaws.com/api/db/jake/test/new_ledger' --header 'Content-Type: application/json' cdk deploy S3ToLambdaSeedStack- note the bucket you created
- upload eateries_schema.json to the s3 bucket
- upload eateries.json to the s3 bucket
curl --location --request POST http://[load balancer url]/api/db/[ledger name]/query --header 'Content-Type: application/json' --data-raw '{"query": {"select":["*"], "from": "eateries"}}'to test you have uploaded data- i.e.
curl --location --request POST http://NodeD-NodeF-MFIO5M9JPL04-1306336054.us-east-1.elb.amazonaws.com/api/db/jake/test/query --header 'Content-Type: application/json' --data-raw '{"query": {"select":["*"], "from": "eateries"}}'
- modify lib/traffic_generator-stack.ts for the number of load generating tasks you want to run
cdk deploy TrafficGeneratorStack- watch the autoscaling work
cdk destroy --alland answer any prompts to destroy the stacks