Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 2.51 KB

README.md

File metadata and controls

62 lines (39 loc) · 2.51 KB

Prerequisites

  1. AWS account
  2. A Lambda function to monitor
  • Lambda function handler should be named handler and exported from a index.js or index.mjs file in the Lambda's default root diretory
  1. AWS credentials in a shared file
  2. Node.js
  3. Terraform
  4. Server accessible via an HTTPS address

Your AWS accout needs to have IAM permissions to create the following resources:

  • aws_cloudwatch_metric_stream
  • aws_iam_role
  • aws_iam_role_policy
  • aws_kinesis_firehose_delivery_stream
  • aws_lambda
  • aws_s3_bucket
  • aws_s3_bucket_public_access_block

Install

Install the firefly cli using npm. Run npm install -g try-firefly

If using Ubuntu, also run the following command replacing username with your username:

sudo chown -R username:username /usr/local/lib/node_modules/try-firefly/
  • This will make the user the owner of the global Firefly installation

Getting started

  1. Run firefly to see available commands

  1. Run firefly init to instrument your Lambda functions and setup a metric stream and firehose

  1. Run firefly destroy to teardown the metric stream and firehose

The cli instruments functions based on region. If you have functions residing in different regions, simply run the CLI again to setup the necessary infrastructure in that region.

Instrumentation:

The instrumentation of a Lambda will add the following Lambda Layers to Lambda:

For more info, check out Firefly's GitHub here!