[ aws . amplifygen3 . integration ]

edit

Description

Change an existing integration. Use –prefix or –no-prefix to rename the environment variables it passes to your app; this is the only change for s3, dsql, and bedrock integrations. For custom integrations you can also add, change, or remove the variables themselves; variables you do not mention stay as they are. The app gets the changes the next time each connected environment is deployed.

With no change flags, the command lets you pick what to change interactively; in CI (CI=true), where it cannot prompt, it fails instead. The interactive prompt changes the prefix and plaintext variables only. To set a secret, pass –integ-secret-env-var with –integ-secret-env-file.

The resource an integration points to and its tags cannot be changed. To use a different resource, delete the integration and connect a new one.

Synopsis

  edit
--name <value>
[--id <value>]
[--arn <value>]
[--prefix <value>]
[--no-prefix]
[--integ-env-var <value>]
[--integ-secret-env-var <value>]
[--integ-secret-env-file <value>]
[--integ-env-var-unset <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

--name (string) [required] Name of the integration to edit. Shorthand: -n.

--id (string) Not editable: an integration always points to the resource it was created with. To use a different resource, delete the integration and connect a new one.

--arn (string) Not editable: an integration always points to the resource it was created with. To use a different resource, delete the integration and connect a new one.

--prefix (string) Prefix added to the name of every environment variable the integration passes to your app, so KEY is deployed as PREFIX_KEY. Start with an uppercase letter, then use uppercase letters, digits, and underscores. Values are not changed. Cannot be combined with –no-prefix.

--no-prefix (boolean) Remove the prefix, so every environment variable goes back to its original name. Cannot be combined with –prefix.

--integ-env-var (string) Add or change a plaintext environment variable, as KEY=VALUE. VALUE cannot be empty. Repeat the flag for more. Custom integrations only.

--integ-secret-env-var (string) Add or change a secret environment variable, by name. Repeat the flag for more. The value is read from the file given with –integ-secret-env-file, so it never appears in your shell history. Custom integrations only.

--integ-secret-env-file (string) Path to a dotenv file, one KEY=VALUE per line (the same format as aws amplifygen3 var upload). Only the keys named with –integ-secret-env-var are read; other keys are ignored. Custom integrations only.

--integ-env-var-unset (string) Remove an environment variable, by name. Repeat the flag for more. A variable cannot be set and removed in the same command. Custom integrations only.

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.

Examples

Note

To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.

Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .

Example 1: To rename the variables an integration passes to your app

The following integration edit example adds a prefix, so an S3 integration’s BUCKET_NAME reaches the app as UPLOADS_BUCKET_NAME. A prefix is the only change available for s3, dsql, and bedrock integrations.

aws amplifygen3 integration edit \
    --name uploads-bucket \
    --prefix UPLOADS

Output:

Edited integration 'uploads-bucket'

Example 2: To remove a prefix

The following integration edit example drops the prefix, so the variables reach the app under their original names.

aws amplifygen3 integration edit \
    --name uploads-bucket \
    --no-prefix

Output:

Edited integration 'uploads-bucket'

Example 3: To change the variables of a custom integration

The following integration edit example changes the variables of a custom integration. Variables you do not mention stay as they are.

aws amplifygen3 integration edit \
    --name payments-api \
    --integ-env-var PAYMENTS_URL=https://payments.example.com \
    --integ-env-var-unset LEGACY_URL

Output:

Edited integration 'payments-api'

The app receives the changes the next time each connected environment is deployed.

Examples

Add or update plaintext variables (unmentioned variables are left untouched):

$ aws amplifygen3 integration edit --name my-queue \
    --integ-env-var BATCH_SIZE=20

Rotate a secret: name the key, supply the new value in a dotenv file (only the named keys are read from the file):

$ aws amplifygen3 integration edit --name my-queue \
    --integ-secret-env-var DLQ_WEBHOOK \
    --integ-secret-env-file .env.local

Delete a variable:

$ aws amplifygen3 integration edit --name my-queue \
    --integ-env-var-unset QUEUE_URL

Rename the deployed name of every variable in one call (values are not re-sent; BATCH_SIZE deploys as BACKEND_BATCH_SIZE), or reset the names with –no-prefix:

$ aws amplifygen3 integration edit --name my-queue --prefix BACKEND
$ aws amplifygen3 integration edit --name my-queue --no-prefix