Install the nRF Asset Tracker into your AWS accountΒΆ

The following commands set up the necessary resources in your AWS account:

# Create the S3 Bucket for publishing the lambdas
npx cdk -a 'node dist/cdk/cloudformation-sourcecode.js' deploy

# One-time operation to support large CloudFormation templates in CDK
npx cdk bootstrap aws://`aws sts get-caller-identity | jq -r '.Account' | tr -d '\n'`/${AWS_REGION}

# Deploy the example (see the note below)
#   It will prompt:
#     Do you wish to deploy these changes (y/n)?
#   twice (the first is for the main stack, and the second is when deploying the web application stack)
#   Both need to be confirmed with 'y'
npx cdk deploy '*'

# This is a fix for a bug with AWS CloudFormation and HTTP APIs
# See https://github.com/bifravst/aws/issues/455
node dist/cdk/helper/addFakeRoute.js

The initial deployment will take a few minutes because it sets up a CloudFront distribution for the web application.

Note

The AWS CDK provides a list of permission changes to your account, and you need to review them carefully whenever you make changes to the setup. However, this step is not mandatory and you can safely skip it, because you are deploying in a blank account. To skip this step in future, run npx cdk deploy '*' --require-approval never. Do this only in standalone accounts for development purposes.