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:

  1. Navigate to your IAM console and add a new user for programmatic access.

  2. 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.

  3. Add the Access key ID and Secret access key, to a new .envrc file (used with direnv), as shown in the following code:

    # ~/nrf-asset-tracker
    
    # add to .envrc
    export AWS_ACCESS_KEY_ID="value of Access key ID"
    export AWS_SECRET_ACCESS_KEY="value of Secret access key"
  4. Add your preferred region to the .envrc file, as shown in the following code (eu-west-1 is a safe example):

    # ~/nrf-asset-tracker
    
    # 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.

  5. Run the following command to allow the changed .envrc file:

    direnv allow