Browse docs
On this page

AWS CloudWatch

Create or reuse a read-only AWS access key and import selected CloudWatch log groups.

The AWS CloudWatch input imports selected log groups using an AWS IAM access key with read-only permissions. In the app, open Connect Your Data, choose AWS CloudWatch, and follow the guided setup. Once it is connected, the account appears in Data Sources like any other input, and its log groups, region and access key are managed from there.

What you need

The app asks for both parts of an AWS access key:

  • Access Key ID, usually beginning with AKIA.
  • Secret Access Key, shown by AWS only when the key is created.

We validate the credentials with AWS before storing the secret encrypted at rest. The key must be able to call sts:GetCallerIdentity and read CloudWatch Logs.

Use a key already configured in the AWS CLI

For the default AWS CLI profile, these commands print the values the connection needs:

Shell
aws configure get aws_access_key_id
aws configure get aws_secret_access_key

For a named profile, add --profile to both commands:

Shell
aws configure get aws_access_key_id --profile production
aws configure get aws_secret_access_key --profile production

The second command prints a secret. Run it only in a terminal you trust, do not paste the result into chat or a ticket, and clear the terminal when finished.

These commands only read credentials stored in the local AWS CLI configuration. If your profile uses IAM Identity Center, temporary credentials, environment variables, or another credential provider, they may return nothing.

Find an IAM user's access keys

This command lists the Access Key IDs belonging to an IAM user:

Shell
aws iam list-access-keys --user-name YOUR_IAM_USER --output table

AWS does not return the Secret Access Key from this command, or from any later IAM request. If you no longer have the secret, create a new access key and disable or delete the old one after the app validates the replacement.

Use the command generated by the AWS CloudWatch setup when possible. It creates a dedicated IAM user with only the permissions needed to identify the AWS account and read CloudWatch Logs. Keeping this integration separate from application and administrator credentials makes rotation and removal much safer.

After validation, select the log groups to import. You can optionally attach a Data Flow to redact, extract, rename, or drop fields before events are stored.