Back to Aws Doc Sdk Examples

AWS CDK for FSA

applications/feedback_sentiment_analyzer/cdk/README.md

latest1.6 KB
Original Source

AWS CDK for FSA

Deploy the Feedback Sentiment Analyzer (FSA) with the AWS Cloud Development Kit (AWS CDK).

Prerequisites

Set variables

Export these variables:

NameUsage
FSA_NAMEShort one-word name to identify this stack.
FSA_EMAILEmail address for the pre-verified default user account.
FSA_LANGProgramming language for the Lambdas in this deployment.

bash/zsh

export FSA_NAME=
export FSA_EMAIL=
export FSA_LANG=

Windows cmd

set FSA_NAME=
set FSA_EMAIL=
set FSA_LANG=

Windows Powershell

$Env:FSA_NAME =
$Env:FSA_EMAIL =
$Env:FSA_LANG =

Deploy

  1. npm install
  2. Deploy the backend: cdk deploy "fsa-${FSA_NAME}-${FSA_LANG}"

Useful commands

  • npm run build - Compile typescript to js
  • npm run watch - Watch for changes and compile
  • npm run test - Perform the jest unit tests
  • cdk deploy - Deploy this stack to your default AWS account/Region
  • cdk diff - Compare deployed stack with current state
  • cdk synth - Emits the synthesized AWS CloudFormation template