Telemetry in the Amazon SAM CLI
At Amazon, we develop and launch services based on what we learn from interactions with customers. We use customer feedback to iterate on our product. Telemetry is additional information that helps us to better understand our customers' needs, diagnose issues, and deliver features that improve the customer experience.
The Amazon SAM command line interface (CLI) collects telemetry, such as generic usage metrics, system and environment information, and errors. For details about the types of telemetry collected, see Types of information collected.
The Amazon SAM CLI does not collect personal information, such as user names or email addresses. It also does not extract sensitive project-level information.
Customers control whether telemetry is turned on, and they can change their settings at any point of time. If telemetry remains on, the Amazon SAM CLI sends telemetry data in the background without requiring any additional customer interaction.
Turn off telemetry for a session
In macOS and Linux operating systems, you can turn off telemetry for a single session.
To turn off telemetry for your current session, run the following command to set the
environment variable SAM_CLI_TELEMETRY
to false
. Repeat the
command for each new terminal or session.
export SAM_CLI_TELEMETRY=0
Turn off telemetry for your profile in all sessions
Run the following commands to turn off telemetry for all sessions when you're running the Amazon SAM CLI on your operating system.
To turn off telemetry in Linux
-
Run:
echo "export SAM_CLI_TELEMETRY=0" >>~/.profile
-
Run:
source ~/.profile
To turn off telemetry in macOS
-
Run:
echo "export SAM_CLI_TELEMETRY=0" >>~/.profile
-
Run:
source ~/.profile
To turn off telemetry in Windows
You can set the environment variable temporarily for the lifetime of the terminal window with the following command:
If using Command Prompt:
set SAM_CLI_TELEMETRY=0
If using PowerShell:
$env:SAM_CLI_TELEMETRY=0
To set the environment variable permanently in either the Command Prompt or PowerShell, use the following command:
setx SAM_CLI_TELEMETRY 0
Note
Changes will not go into effect until the terminal has been closed and reopened.
Types of information collected
-
Usage information – The generic commands and subcommands that customers run.
-
Errors and diagnostic information – The status and duration of commands that customers run, including exit codes, internal exception names, and failures when connecting to Docker.
-
System and environment information – The Python version, operating system (Windows, Linux, or macOS), environment in which the Amazon SAM CLI runs (for example, Amazon CodeBuild, an Amazon IDE toolkit, or a terminal), and hash values of usage attributes.
Learn more
The telemetry data that the Amazon SAM CLI collects adheres to the Amazon data privacy policies. For more information, see the following: