Giter VIP home page Giter VIP logo

aws-serverless-centralized-logs's Introduction

AWS Serverless Centralized Logs Solution

architecture

๐Ÿ”ง Getting Started

As a first step we will execute a template in AWS Cloudformation which creates a stack that configures the following services:

Service Description
IAM Role Creates roles and permissions for Amazon Kinesis Data Firehose and AWS Glue Crawler
Amazon S3 Creates log bucket with lifecycle policy
AWS Glue Creates AWS Glue database and crawler
Amazon Kinesis Data Firehose Creates one Amazon Kinesis Data Firehose for each log producer

Cloudformation link

When you upload the template for the stack in AWS Console > Cloudformation, it will request that you provided the parameters that will define the retention period of logs.

CF

โ˜๏ธ Running Samples

ECS

ECS sample link

Lambda & API Gateway

Lambda & API Gateway sample link

EC2

EC2 sample link

๐Ÿ” Query Logs

Now go to Athena Query Editor on the AWS Console. Then you can select the name (logdb-your_accountid) you created in CloudFormation in the "Database" option of the Query Editor, and you should now be able to see the list of registered tables. If you want to click on the three dots next to a table name and request a preview of it, it will run a query for the first 10 lines. Check that it is working.

PS.: Check if the AWS Glue Crawler was executed or execute it manually on Glue console.

query1

Also, you are able to do more specific queries on logs.

query2

๐Ÿ’ต Costs

This is an estimation of the solution based on the following requirements:

  • Total of 1 TB/month logs ingested and stored;
  • Total of 1 TB/month logs consumed;
  • Calculated on N.Virginia (us-east-1) region at June, 2021;

PS.: You can utilize the AWS Calculator to estimate your costs https://calculator.aws/

serverless cloudwatch

๐Ÿ”’ Security

See CONTRIBUTING for more information.

๐Ÿ“œ License

This library is licensed under the MIT-0 License. See the LICENSE file.

๐Ÿ“ References and Links

aws-serverless-centralized-logs's People

Contributors

amazon-auto avatar gabrielmartinigit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.