---
title: Integrate Capawesome Insiders with AWS Amplify
description: Install private Capawesome Insiders npm packages in AWS Amplify deployments. Configure access tokens and npm registry for Capacitor app hosting.
---

# AWS Amplify

You can use private Capawesome npm packages within your [AWS Amplify](https://aws.amazon.com/amplify/){:target="_blank"} deployments by configuring the Capawesome npm registry.
This guide shows you how to set up authentication to access the private packages from the Capawesome Insiders program.

## Preparation

### Create an AWS Amplify Environment Variable

[Get your license key](../faq.md#where-can-i-find-my-license-key) and add it to your AWS Amplify app as an environment variable with the name `CAPAWESOME_NPM_REGISTRY_TOKEN` as described in [Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/setting-env-vars.html){:target="_blank"}.

???+ warning "Keep your license key secure"

    Never commit your license key directly to your repository and always use environment variables to store sensitive information like authentication tokens.

## Configuration

### Configure the amplify.yml file

Create or update the `amplify.yml` file in the root of your project and add the following commands to the `preBuild` phase:

```yml
- echo "@capawesome-team:registry=https://npm.registry.capawesome.io" >> .npmrc
- echo "//npm.registry.capawesome.io/:_authToken=${CAPAWESOME_NPM_REGISTRY_TOKEN}" >> .npmrc
```

This will automatically configure npm to use the Capawesome registry for `@capawesome-team` packages during AWS Amplify builds.

### Example

Here's a complete example of an `amplify.yml` file for a project using private Capawesome packages:

```yml
version: 1
frontend:
  phases:
    preBuild:
      commands:
        - echo "@capawesome-team:registry=https://npm.registry.capawesome.io" >> .npmrc
        - echo "//npm.registry.capawesome.io/:_authToken=${CAPAWESOME_NPM_REGISTRY_TOKEN}" >> .npmrc
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: dist
    files:
      - '**/*'
```
