Back to Aws Doc Sdk Examples

Amazon Cloudwatch Logs JavaScript SDK v2 code examples

javascript/example_code/cloudwatch-logs/README.md

latest2.7 KB
Original Source

Amazon Cloudwatch Logs JavaScript SDK v2 code examples

Purpose

The code examples in this directory demonstrate how to work with Amazon CloudWatch Logs using the AWS SDK for JavaScript v2.

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon Elastic Compute Cloud (Amazon EC2) instances, AWS CloudTrail, Route 53, and other sources.

Code examples

API examples

Important

  • As an AWS best practice, grant this code least privilege, or only the permissions required to perform a task. For more information, see Grant least privilege in the AWS Identity and Access Management User Guide.
  • This code has not been tested in all AWS Regions. Some AWS services are available only in specific AWS Regions. For more information, see the AWS Regional Services List on the AWS website.
  • Running this code might result in charges to your AWS account.

Running the code

Prerequisites

Most of these code example files can be run with very little to no modification. For example, to use Node.js to run the cwl_deletesubscriptionfilter.rb file, replace the hard-coded values in the file with your own values, save the file, and then run the file. For example:

node cwl_deletesubscriptionfilter.js

Resources