- Create
.env
file from.env.sample
and update the relevant variables.
# Move to 'workshop-2' directory
cd workshop-2
# Export the environment variables to the shell
export $(grep -v '^#' .env | xargs)
# Deploy Cognito Services with CDK
cdk deploy --profile ${AWS_USERNAME}
Note: Just Skip this step if you already walk through this step in Module 1.
- Install source dependencies (skip this step if you already walk through this step in Module 1).
pip install -r src/requirements.txt -t src/packages/python
- Set
STACK_ORDER_ENABLED
in.env
totrue
then export the variables to the terminal again.
# Export the environment variables to the shell
export $(grep -v '^#' .env | xargs)
- Then deploy the cdk stack again using
cdk deploy
. You can also runcdk synth
before the deployment and have a look oncdk.out
folder to see the changes in the stack.
# Deploy Order Service with CDK
cdk deploy --profile ${AWS_USERNAME}
- Set
STACK_ORDER_PROCESSOR_ENABLED
in.env
totrue
then export the variables to the terminal again.
# Export the environment variables to the shell
export $(grep -v '^#' .env | xargs)
- Deploy the cdk stack again using
cdk deploy
.
# Deploy Order Service with CDK
cdk deploy --profile ${AWS_USERNAME}
- Play around with Order API when create order, use
X-Ray
,Cloudwatch Logs
to get information on flow and log data.
Note: It is recommended that you should only enable one feature at a time to have a good exploration on the pattern. Enable both features is okay if you can play around simotanously processing stream event using 2 separate flows, then you may need to update lambda function 'ProcessOrder' to support consitent read
- Set
STACK_ORDER_PROCESSOR_ENABLED
in.env
tofalse
. - Set
STACK_ORDER_PIPE_ENABLED
in.env
totrue
. - Export the variables to the terminal again.
# Export the environment variables to the shell
export $(grep -v '^#' .env | xargs)
- Deploy the cdk stack again using
cdk deploy
.
# Deploy Order Services with CDK
cdk deploy --profile ${AWS_USERNAME}
# Destroy All Stacks
cdk destroy --profile ${AWS_USERNAME}