example

command module
v0.26.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

README

aws/aws-lambda-go instrumentation example

A simple example to demonstrate the AWS Lambda for Go instrumentation. In this example, container aws-lambda-client initializes an S3 client and an HTTP client and runs 2 basic operations: listS3Buckets and GET.

These instructions assume you have docker-compose installed and setup, and AWS credential configured.

  1. From within the example directory, bring up the project by running:

    docker-compose up --detach
    
  2. The instrumentation works with a stdout exporter. The example pulls this output from AWS and outputs back to stdout. To inspect the output (following build output), you can run:

    docker-compose logs
    
  3. After inspecting the client logs, the example can be cleaned up by running:

    docker-compose down
    

Note: Because the example runs on AWS Lambda, a handful of resources are created in AWS by the example. The example will automatically destroy any resources it makes; however, if you terminate the container before it completes you may have leftover resources in AWS. Should you terminate the container early, run the below command to ensure all AWS resources are cleaned up:

./manualAWSCleanup.sh

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL