Configuring the CloudWatch RUM web client
Your applications can use one of the code snippets generated by CloudWatch RUM to install
the CloudWatch RUM web client. The generated snippets support two installation methods: as a
JavaScript module through NPM, or from a content delivery network (CDN). For best
performance, we recommend using the NPM installation method. For more information about
using this method, see Installing as a JavaScript Module
If you use the CDN installation option, ad blockers might block the default CDN
provided by CloudWatch RUM. This disables application monitoring for users who have ad
blockers installed. Because of this, we recommend that you use the default CDN only for
initial onboarding with CloudWatch RUM. For more information about the ways to mitigate this
issue, see Instrument the application
The code snippet sits in the tag of an HTML file and
installs the web client by downloading the web client, and then configuring the web
client for the application it is monitoring. The snippet is a self-executing function
which looks similar to the following. In this example, the body of the snippet's
function has been omitted for readability.