Set Up SDK Metrics - Amazon CloudWatch

Set Up SDK Metrics

To set up SDK Metrics, you perform some steps with your SDK and some with CloudWatch agent.

To set up SDK Metrics

  1. Create an application with an AWS SDK that supports SDK Metrics.

  2. Host your project on an Amazon EC2 instance or in your local environment.

  3. Install and use the latest version of your SDK.

  4. Install the CloudWatch agent on the EC2 instance or the local environment that is running an application that you want to receive metrics for. For more information, see Installing the CloudWatch Agent.

  5. Configure the CloudWatch agent for SDK Metrics. For more information, see Configure the CloudWatch Agent for SDK Metrics.

  6. Authorize SDK Metrics to collect and send metrics. For more information, see Set IAM Permissions for SDK Metrics.

  7. Enable SDK Metrics. There are multiple methods to do this, depending on which SDK you're using. One method that is universal for all SDKs is to add the following to your environment variables:

    export AWS_CSM_ENABLED=true

    For information about the other methods, see your SDK documentation as shown in the following table.

    Supported SDK SDK Metrics documentation

    AWS CLI 1.16.84 or later

    SDK Metrics

    The instructions for the AWS CLI installation are the same as for SDK for Python (Boto 3).

    AWS SDK for C++ 1.7.47 or later

    SDK Metrics

    AWS SDK for Go 1.16.18 or later

    SDK Metrics in the AWS SDK for Go

    AWS SDK for Java 1.11.523 or later (AWS SDK for Java 2.x is not yet supported)

    Enabling AWS SDK Metrics for Enterprise Support

    AWS SDK for JavaScript in Node.js 2.387 or later

    SDK Metrics in the AWS SDK for JavaScript

    AWS SDK for .NET 3.3.440 or later

    Enabling SDK Metrics

    AWS SDK for PHP 3.85.0 or later

    SDK Metrics in the AWS SDK for PHP Version 3

    AWS SDK for Python (Boto 3) 1.9.78 or later

    SDK Metrics

    AWS SDK for Ruby 3.45.0 or later

    SDK Metrics in the AWS SDK for Ruby