Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.
/ smartvan-aws Public archive

AWS resources for SmartVan

Notifications You must be signed in to change notification settings

coderbyheart/smartvan-aws

Repository files navigation

SmartVan

Test semantic-release Commitizen friendly code style: prettier ESLint: TypeScript

AWS resources for SmartVan.

Deploy to AWS

Make these environment variable available:

ℹ️ Linux users can use direnv to simplify the process.

export AWS_REGION=<...>
export AWS_DEFAULT_REGION=<...>
export AWS_ACCESS_KEY_ID=<Access Key ID of the service account>
export AWS_SECRET_ACCESS_KEY=<Secret Access Key of the service account>

Install dependencies

npm ci

Compile the source

npx tsc

Set the ID of the stack

export STACK_NAME="${STACK_NAME:-smartvan}"

Prepare the account for CDK resources:

npx cdk -a 'node dist/cloudformation-sourcecode.js' deploy

Deploy the server stack to an AWS account

npx cdk deploy ${STACK_NAME:-smartvan}

Create a Thing for the SmartVan

Create a Thing and assign it to the smartvan group.

mkdir certificates
aws iot create-thing --thing-name smartvan
aws iot add-thing-to-thing-group  --thing-group-name smartvan --thing-name smartvan
aws iot create-keys-and-certificate --set-as-active > certificates/smartvan.json
aws iot attach-thing-principal --thing-name smartvan --principal `cat certificates/smartvan.json | jq -r ".certificateArn"`

About

AWS resources for SmartVan

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published