<a id="cli-aws-amplifygen3-access-control-edit"></a>

# edit

## Description

Set up the app’s identity provider, or change who can open an environment.

With –scope, –rule, or –rule-conditions, the command changes who can open an environment that already has access control on (turn it on with `aws amplifygen3 access-control enable`): the preview environment, or the ones you name with -e. It waits briefly to confirm the change; pass –watch to keep waiting until it is applied. Repeat -e for several environments.

With –type, the command configures the identity provider that all environments sign in with: –type team uses IAM Identity Center, and –type oidc uses an OpenID Connect provider and needs –issuer, –client-id, and either –client-secret or –client-secret-arn. The OIDC and Identity Center flags imply their –type (team when none is given). Running it again replaces the provider; the replacement takes a moment, and –watch waits for it. –clear removes the provider, which works only once no environment has access control on. These flags cannot be combined with -e.

## Synopsis

```
  edit
[--app <value>]
[--env <value>]
[--watch]
[--timeout <value>]
[--type <value>]
[--clear]
[--issuer <value>]
[--client-id <value>]
[--client-secret]
[--client-secret-arn <value>]
[--token-type <value>]
[--token-validation <value>]
[--authorization-endpoint <value>]
[--token-endpoint <value>]
[--grant-type <value>]
[--refresh-token-strategy <value>]
[--authorize-request-param <value>]
[--token-request-param <value>]
[--instance-arn <value>]
[--group-id <value>]
[--scope <value>]
[--rule <value>]
[--rule-conditions <value>]
[--client-token <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]
```

## Options

`--app` (string)
App name. If omitted, the name is read from amplify.jsonc in the current directory, then package.json, then the current directory name. Shorthand: -a.

`--env` (string)
Environment to change. Defaults to preview. Repeat the flag for several environments. Not used with the identity provider flags (–type, –clear, and the OIDC and Identity Center flags). Shorthand: -e.

`--watch` (boolean)
Wait until the identity provider, or with -e the access control of each environment, has finished updating or fails. In CI or when run by an agent, the wait stops after 60 seconds unless you pass –timeout; the command then exits non-zero and reports that the change is still in progress.

`--timeout` (string)
How long –watch waits before it stops, for example 30s, 5m, or 1h. Defaults to 10m in a terminal and 60s in CI or when run by an agent. Has no effect without –watch.

`--type` (string)
Identity provider to use: ‘team’ (the default) for IAM Identity Center, or ‘oidc’ for an OpenID Connect provider. The OIDC flags, such as –issuer, work only with –type oidc, and –instance-arn and –group-id only with –type team.

> * `oidc`
> * `team`

`--clear` (boolean)
Remove the app’s identity provider. This fails while any environment still has access control on; turn it off first with `aws amplifygen3 access-control disable`.

`--issuer` (string)
Issuer URL of the OIDC provider, starting with [https://](https://). Required with –type oidc.

`--client-id` (string)
Client ID of the app you registered with the OIDC provider. Required with –type oidc.

`--client-secret` (boolean)
Prompt for the OIDC client secret without showing it, or read it from stdin when piped, so it never appears on the command line. Use this or –client-secret-arn.

`--client-secret-arn` (string)
ARN of a Secrets Manager secret that holds the OIDC client secret. The CLI reads the secret with your credentials, so you need secretsmanager:GetSecretValue on it. Use this or –client-secret.

`--token-type` (string)
Which token from the provider to check: ‘id’ (the default) for the ID token, or ‘access’ for the access token.

> * `id`
> * `access`

`--token-validation` (string)
Audience (aud) value the token must carry to be accepted. Repeat the flag for several values, up to 10.

`--authorization-endpoint` (string)
URL of the provider’s sign-in (authorization) endpoint, starting with [https://](https://). Set it only to use a different endpoint than the one in the provider’s discovery document.

`--token-endpoint` (string)
URL of the provider’s token endpoint, starting with [https://](https://). Set it only to use a different endpoint than the one in the provider’s discovery document.

`--grant-type` (string)
OAuth grant used at sign-in: ‘code-with-pkce’ (the default) or ‘code’. Use ‘code’ only if the provider does not support PKCE.

> * `code`
> * `code-with-pkce`

`--refresh-token-strategy` (string)
How sign-in asks the provider for a refresh token, which keeps users signed in: ‘no-scope’ (the default) does not request the `offline_access` scope, and ‘offline-access-scope’ does. Pass ‘offline-access-scope’ for providers that only issue refresh tokens for that scope (for example Okta, Auth0 or Entra), otherwise users are signed out when the ID token expires.

> * `offline-access-scope`
> * `no-scope`

`--authorize-request-param` (string)
Extra parameter to add to the sign-in request sent to the provider, as key=value, for example prompt=select_account. Repeat the flag for several, up to 20.

`--token-request-param` (string)
Extra parameter to send when exchanging the sign-in code for tokens, as key=value. Repeat the flag for several, up to 20.

`--instance-arn` (string)
ARN of the IAM Identity Center instance to use with –type team. Defaults to the account’s instance.

`--group-id` (string)
ID of an IAM Identity Center group whose members are allowed in. Use with –type team.

`--scope` (string)
Which deployments require sign-in: ‘all’ for every deployment, or ‘non-active’ for every deployment except the active deployment, the one the environment URL serves, which stays public. Use with -e.

> * `all`
> * `non-active`

`--rule` (string)
Who is allowed in after signing in: ‘any-authenticated-user’ for anyone who signs in, or ‘user-claims’ for only users whose token claims match –rule-conditions, which is then required. Use with -e.

> * `any-authenticated-user`
> * `user-claims`

`--rule-conditions` (string)
New conditions for the user-claims rule, as a JSON array of objects with key, operator, and value, for example `[{"key": "email", "operator": "ends-with", "value": "@example.com"}]`. The operator is equals, contains, begins-with, or ends-with. A caller matching any one condition is admitted; conditions are OR-combined, not AND, so adding one widens access. Up to 25 conditions. Replaces the environment’s current conditions. Use with -e.

`--client-token` (string)
A unique string that makes retries safe: running the command again with the same token does not repeat the change. Use with -e.

## Global Options

`--debug` (boolean)

Turn on debug logging.

`--endpoint-url` (string)

Override command’s default URL with the given URL.

`--no-verify-ssl` (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

`--no-paginate` (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

`--output` (string)

The formatting style for command output.

* json
* text
* table
* yaml
* yaml-stream
* off

`--query` (string)

A JMESPath query to use in filtering the response data.

`--profile` (string)

Use a specific profile from your credential file.

`--region` (string)

The region to use. Overrides config/env settings.

`--version` (string)

Display the version of this tool.

`--color` (string)

Turn on/off color output.

* on
* off
* auto

`--no-sign-request` (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

`--ca-bundle` (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

`--cli-read-timeout` (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

`--cli-connect-timeout` (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

`--cli-binary-format` (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob `fileb://` will always be treated as binary and use the file contents directly regardless of the `cli-binary-format` setting. When using `file://` the file contents will need to properly formatted for the configured `cli-binary-format`.

* base64
* raw-in-base64-out

`--no-cli-pager` (boolean)

Disable cli pager for output.

`--cli-auto-prompt` (boolean)

Automatically prompt for CLI input parameters.

`--no-cli-auto-prompt` (boolean)

Disable automatically prompt for CLI input parameters.

`--cli-error-format` (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

* legacy
* json
* yaml
* text
* table
* enhanced

`--help` (boolean)

Display help for the command/subcommand.
