FAQs on CloudWatch supported protocols - Amazon CloudWatch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

FAQs on CloudWatch supported protocols

CloudWatch now supports for two additional protocols: Amazon JSON 1.0 and Smithy RPC v2 CBOR. These protocols provide better performance than the Amazon Query protocol that is currently utilized by the Amazon SDKs and CLIs. Amazon SDKs will prioritize the protocol that is the most performant for each language.

What is the Amazon JSON protocol, and how does it differ from existing CloudWatch API requests and responses?

JSON is one of the most widely used and accepted wiring methods for communication between heterogeneous systems. CloudWatch uses JSON as a medium to communicate between an Amazon SDK client (for example, Java, Python, Golang, JavaScript) and CloudWatch server. An HTTP request of an CloudWatch API operation accepts input in the form of JSON. The CloudWatch operation is executed and the response of execution is shared back to the SDK client in the form of JSON. Compared to Amazon query, JSON is more efficient at transporting data between client and server.

  • CloudWatch Amazon JSON protocol acts as a mediator between CloudWatch client and server.

  • The server doesn't understand the programming language in which the CloudWatch operation is created, but it understands the Amazon JSON protocol.

  • The CloudWatch Amazon JSON protocol uses the serialization (convert object to JSON format) and deserialization (convert JSON format to object) between the CloudWatch client and server.

What is the Smithy RPC v2 CBOR protocol, and how does it differ from existing CloudWatch API requests and responses?

The Concise Binary Object Representation (CBOR) is a data format focused on efficiency and flexibility. Its key design goals include extremely small code size, compact message size, and version-free extensibility. Smithy RPC v2 CBOR, an Amazon-invented protocol, builds on these advantages to enable more efficient data transmission. RPC V2 CBOR implements binary encoding rather than the text encoding of JSON, reducing the size of payloads and the time spent on serialization.

  • CloudWatch RPC v2 CBOR protocol acts as a mediator between CloudWatch client and server.

  • The server doesn't understand the programming language in which the CloudWatch operation is created, but it understands the RPC v2 CBOR protocol.

  • The CloudWatch RPC v2 CBOR protocol uses the serialization (convert object to CBOR format) and deserialization (convert CBOR format to object) between the CloudWatch client and server.

How do I get started with the newer protocols for CloudWatch?

The new protocols are now available in a public preview version of the SDKs. SDKs can be downloaded using the instructions below.

Note

The following specific issues are present in the preview version of the CloudWatch SDKs listed below. Using this preview SDK means these issues could affect your integration. We plan to address these issues before the final release.

  • Affecting all SDKs – The preview version removes trailing null values from lists. In the final release, these values will be properly serialized

  • Specific to Java SDK v1 – The preview version does not serialize empty lists. In the final release, empty lists will be properly serialized

SDK Client Protocol Support
Language SDK client repository SDK download link SDK installation instructions Protocol
C++ aws/aws-sdk-cpp Link to download Installation instructions Amazon JSON 1.0
Golang 2.x aws/aws-sdk-go-v2 Link to download Installation instructions RPC v2 CBOR
Java 1.x aws/aws-sdk-java Link to download Installation instructions Amazon JSON 1.0
Java 2.x aws/aws-sdk-java-v2 Link to download Installation instructions RPC v2 CBOR
JavaScript v3.x aws/aws-sdk-js-v3 Link to download Installation instructions Amazon JSON 1.0
.NET aws/aws-sdk-net Link to download Installation instructions Amazon JSON 1.0
PHP aws/aws-sdk-php Link to download Installation instructions Amazon JSON 1.0
Python-boto3 boto/boto3 Link to download Installation instructions Amazon JSON 1.0
awscli Amazon CLI v1 artifact Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 source distribution Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 source distribution detached Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 Windows MSI Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 Linux X86 Docker Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 Linux X86 Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 Linux X86 installer detached Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 Linux ARM Docker Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 Linux ARM Link to download Installation instructions Amazon JSON 1.0
Amazon CLI v2 Linux ARM installer detached Link to download Installation instructions Amazon JSON 1.0
Ruby aws/aws-sdk-ruby Link to download Installation instructions Amazon JSON 1.0
Powershell Link to download Installation instructions Amazon JSON 1.0
Rust awslabs/aws-sdk-rust Link to download Installation instructions RPC v2 CBOR
Swift awslabs/aws-sdk-swift Link to download Installation instructions RPC v2 CBOR
Kotlin awslabs/aws-sdk-kotlin Link to download Installation instructions RPC v2 CBOR

What are the risks of enabling these new protocols for my CloudWatch workloads?

If you are using a custom implementation of Amazon SDK or a combination of custom clients and Amazon SDK to interact with CloudWatch that generates Amazon Query based (aka XML-based) responses, it may be incompatible with Amazon JSON or CBOR protocol. If you encounter any issues, contact Amazon Support.

What if I am already on the latest Amazon SDK version, but my open sourced solution does not support JSON or CBOR?

You must change your SDK version to a previous version. See How do I get started with the newer protocols for CloudWatch? for how to get started with the newer protocols for CloudWatch and select a version lower than listed. If you change your Amazon SDK to the previous version, your CloudWatch APIs will use the Amazon query protocol.

What regions are supported for Amazon JSON and CBOR protocols used in CloudWatch APIs

CloudWatch supports Amazon JSON and CBOR protocol in all Amazon regions where CloudWatch is available.

What latency improvements can I expect when upgrading to the specified Amazon SDK versions for CloudWatch using the newer protocols?

Both JSON and CBOR provides between 50% to 80% latency improvement when compared to the Amazon Query. CBOR is 50% faster for the client. Both protocols are 10-20% more efficient in network bandwidth usage.

Will Amazon query protocol be deprecated?

Amazon query protocol will continue to be supported. You can continue using Amazon query protocol as long as your Amazon SDK version is set any previous version other that what is listed in How do I get started with Amazon JSON protocols for CloudWatch.

Where can I find more information about Amazon JSON and Smithy RPC v2 CBOR protocols?

You can find more information about JSON protocol at Amazon JSON 1.0 protocol in the Smithy documentation.

For more about CloudWatch API requests, see Making API Requests in the CloudWatch API Reference Guide.