AWS CDK for SRS
Install AWS CLI, then configure the credentials:
aws configure set region us-west-2
aws configure set aws_access_key_id YOUR_ACCESS_KEY_ID
aws configure set aws_secret_access_key YOUR_SECRET_ACCESS_KEYNow you are ready to deploy using the CDK. Run command in each directory:
cd srs-cdk-ec2-single-origin
cdk deployAlternatively, you can use an environment variable to change the target region for CDK deployment.
env AWS_REGION=us-east-2 cdk deployIf you need to directly specify the account and region for the CDK:
env CDK_DEPLOY_ACCOUNT=YOUR_AWS_ACCOUNT CDK_DEPLOY_REGION=us-east-2 cdk deployFor other use scenarios, please follow the instructions provided in each example.
- srs-cdk-ec2-single-origin: A single SRS origin server runs on an EC2 instance.
For each example, the cdk.json file tells the CDK Toolkit how to execute your app. Below are some useful commands.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testsnpx cdk deploydeploy this stack to your default AWS account/regionnpx cdk diffcompare deployed stack with current statenpx cdk synthemits the synthesized CloudFormation template