Provide your AWS credentials
To set up the nRF Asset Tracker on AWS, you must first provide the AWS credentials.
Note
It is recommended to install these resources in a blank AWS account to clearly separate them from your other projects. See the best practices for setting up your multi-account AWS environment. After you have registered your personal account, sign up for AWS Organizations and create an account for the nRF Asset Tracker. You can have many accounts without extra costs.
To provide the AWS credentials to the nRF Asset Tracker, complete the following steps:
Navigate to your IAM console and add a new user for programmatic access.
Attach the
arn:aws:iam::aws:policy/AdministratorAccess
policy directly.Note
This action will create a user with full access rights to the account, and therefore it must only be created in an account dedicated for the nRF Asset Tracker.
Add the Access key ID and Secret access key, to a new
.envrc
file (used with direnv), as shown in the following code:# add to .envrc export AWS_ACCESS_KEY_ID="value of Access key ID" export AWS_SECRET_ACCESS_KEY="value of Secret access key"
Add your preferred region to the
.envrc
file, as shown in the following code (eu-west-1
is a safe example):# add to .envrc export AWS_DEFAULT_REGION="your preferred AWS region" export AWS_REGION="your preferred AWS region"
Note
Not all AWS features are available in all AWS regions. You will see a warning if you are deploying to a region that has not been tested and the AWS CDK might fail. The list of supported regions can be found in the repository.
Run the following command to allow the changed
.envrc
file:direnv allow