Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,22 @@ value: abc123
lastUpdated: Mon Nov 13 2023 22:19:12 GMT-0800 (Pacific Standard Time)
```

### Remove secrets
### Remove secret

To remove a secret from from the sandbox, run the following command in your terminal:

```bash
npx ampx sandbox secret remove foo
```

### Remove all secrets

To remove all secrets from the sandbox, run the following command in your terminal:

```bash
npx ampx sandbox secret remove --all
```

### Reference secrets

Once you have set a secret, you can reference the secret in your backend definition using the `secret()` function. The following example shows how to set up social sign-in with authentication in your app. Depending on your environment, Amplify will automatically load the correct secret value.
Expand Down
8 changes: 8 additions & 0 deletions src/pages/[platform]/reference/cli-commands/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ If you want to remove a secret you previously set, use `sandbox secret remove`:
npx ampx sandbox secret remove LOGINWITHAMAZON_CLIENT_ID
```

#### Removing all secrets

If you want to remove all secrets you previously set, use `sandbox secret remove --all`:

```bash title="Terminal" showLineNumbers={false}
npx ampx sandbox secret remove --all
```

#### Listing secrets

List all available secrets for your personal sandbox in the default AWS profile and Region:
Expand Down