Getting started with AWS

Better Stack offers a deeply integrated experience with AWS, allowing you to seamlessly monitor your cloud infrastructure.

Deploy our prepared CloudFormation template into your AWS account to gain comprehensive observability. This integration provides:

  • Automatic ingestion of all CloudWatch metrics.
  • Detection and per-log-group optional ingestion of all CloudWatch log groups.
  • Automatic integration with CloudTrail to forward audit logs into Better Stack.
  • Automatic integration with AWS X-Ray; forward traces from AWS into Better Stack.

AWS Integration

1. Create a source

Create a new AWS Source in Better Stack. You can use one source for all your regions, which is recommended for better cross-region trace correlation, or split your regions across different sources to vary retention/permissions.

2. Deploy the CloudFormation stack

You will be presented with a button to "Deploy CloudFormation stack". this will open the CloudFormation "Quick create stack" page from our template.

We set sensible defaults in the Quick create links, but there are four CloudFormation parameters you may wish to review:

  • CreateGlobalResources Create IAM roles. Set to false for secondary regions after the first.

  • EnableTagEnrichment Enable Lambda-based tag enrichment for metrics and logs. Data will still be forwarded to Better Stack without this, but the quality of the contextual information and metric tags will be lower.

  • EnableCloudTrail Create a new CloudTrail trail, and configure AWS to forward that new trail to CloudWatch, and then to Better Stack.

  • EnableXRayTransactionSearch Enable X-Ray Transaction Search to forward X-Ray data to CloudWatch, and then to Better Stack.

The full CloudFormation stack and Lambda definitions can be found in our GitHub repository.

3. Complete the integration

Once the CloudFormation stack is deployed, enter the IntegrationRoleArn and ExternalId outputs from the deployment and press 'Save' to complete the integration.

We will now start loading your log groups.

Controlling forwarded logs

By default, all log groups are automatically subscribed to and forwarded to Better Stack. You can disable this behavior and select specific groups or sets of groups to forward by visiting Source → Configure and selecting the groups you wish to forward from the AWS log groups section.

Removing the AWS integration

To remove the AWS integration, go to AWS → CloudFormation → Stacks → betterstack -> Delete.

All Better Stack configured components will be deleted from the selected region. Logs and metrics will no longer be sent to Better Stack from that region.

When you have the AWS integration deployed in multiple regions, and delete the stack from the first region that you deployed to, AWS will remove IAM roles required by other regions. To resolve this, select a different region, and update the CloudFormation stack (from the same template), setting the CreateGlobalResources to true so that IAM resources are created in the new region.

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏