Telemetry in the AWS CLI for Amplify
The AWS Command Line Interface (AWS CLI) for AWS Amplify sends a small, anonymous usage report when you run an Amplify command. This helps AWS understand how you use the CLI, how often commands succeed or fail, and where to focus improvements. Telemetry is on by default, and you can turn it off at any time.
The CLI tries to send the report but does not guarantee delivery. If your network is slow or unavailable, the CLI silently drops the report. The CLI never slows down or blocks your command. AWS hosts the endpoint that receives all reports over HTTPS. The CLI sends telemetry only from commercial AWS Regions. It does not measure commands that run in the AWS GovCloud (US) Regions or the China Regions.
Each report covers a single command run and includes the following information:
- Command name
-
The command you ran, such as
amplifygen3 create. - Result
-
The duration, exit code, and a success or error category.
- API calls
-
A summary of the AWS API calls the command made. The summary includes service and operation names, call counts, and HTTP status codes. It also includes a relative timestamp for the most recent calls for each operation.
- Environment
-
The CLI version, Python version, operating system, and AWS Region. The report also records whether you ran the command locally or in a continuous integration and continuous delivery (CI/CD) system. The CLI detects these CI/CD systems: AWS CodeBuild, GitHub Actions, GitLab CI, CircleCI, Jenkins, and Bitbucket. For any other CI/CD system, the CLI records a generic label.
- Identifiers
-
A session ID for each run and a stable installation ID, which is a random universally unique identifier (UUID) stored on your machine. These identifiers group runs from the same install.
- Error location
-
On a failed command, the module, function, and line number in the AWS CLI code where the error occurred. The error location never includes file paths, error messages, or variable values.
The CLI does not collect the following:
-
Command arguments or any values you type
-
Credentials
-
File paths
-
The content of your API requests
-
Usernames
To inspect what’s collected, add --debug to any aws amplifygen3 command. The complete report appears in the debug output.
Disabling telemetry in the AWS CLI for Amplify
You can disable telemetry in the AWS CLI for Amplify using any of the following three methods. The environment variable takes precedence over both the CLI command and the config file.
Option 1: Run the CLI command
To turn telemetry off, run aws amplifygen3 telemetry disable. To turn it back on, run aws amplifygen3 telemetry enable. This is the easiest method. The CLI stores the setting in ~/.aws/amplify/telemetry.json.
aws amplifygen3 telemetry disable
Option 2: Set an environment variable
To disable telemetry, set the AWS_AMPLIFY_TELEMETRY environment variable to 0. To explicitly enable it, set the value to 1.
export AWS_AMPLIFY_TELEMETRY=0
You must set this in every shell or session. To make it permanent, add it to your shell profile, such as ~/.bashrc. For automated runs, set it in your CI/CD environment instead. If you set this environment variable, it takes precedence over the CLI command and the config file.
Option 3: Edit the config file
To disable telemetry permanently, edit ~/.aws/amplify/telemetry.json and set telemetry_enabled to false, as shown in the following example:
{ "telemetry_enabled": false, "installation_id": "existing-installation-id" }
Replace existing-installation-id with the installation ID already in your file. This setting applies to the whole machine.
The AWS_CLI_SESSION_ID_DISABLED environment variable, which opts out of session identifiers across the AWS CLI, also disables Amplify telemetry.
After you turn off telemetry using any method, the AWS CLI no longer collects or sends data.
Related information
For more information about the AWS CLI for Amplify, see the following topics: