Coder Social home page Coder Social logo

config-daily-report's Introduction

AWS Config Daily Reporter

The Config Daily Reporter solution can be used in order to generate a daily CSV report. The report will include new or changed resources, with a link to the AWS Config UI. The reporter is triggered using a CloudWatch event, that will trigger a Lambda function. The Lambda will use SES to send an email.

Detailed instructions here: https://aws.amazon.com/blogs/mt/how-to-get-a-daily-report-for-your-resources-configuration-changes/

Prerequisites

Before getting started, make sure that you have a basic understating of the following:

  • Amazon EventBridge rule that runs on a schedule
  • Multi-Account Multi-Region Data Aggregation
  • AWS Lambda Function
  • Python and Boto3.
  • CDK environments.

You will also need to have a pre-configured Multi-Account AWS Config Aggregator and Amazon SES for sending email.

Architecture

  1. Amazon CloudWatch event - will trigger Lambda every day
  2. AWS Lambda - will run Python3 code which includes an AWS Config Query and SendEmail using SES.
  3. AWS Config - aggregator which will get a query from the Lambda function.
  4. Amazon Simple Email Service - will be used to send an email with the CSV file.

Getting Started

  1. git clone https://github.com/aws-samples/config-daily-report
  2. cd config-daily-report/cdk
  3. cdk bootstrap
  4. cdk deploy --parameters aggregator=<aggregator name> \ --parameters RECIPIENT=<recipient email address> \ --parameters SENDER=<sender email address> \ --parameters HOUR=<time in UTC (hour)> \ --parameters MINUTE==< time in UTC (minute)> \ --parameters sesarn=<Your SES ARN>
    Replace the parameters as follows:
    • aggregator - Name of AWS Config Aggregator.
    • RECIPIENT - Email recipient that will get the csv report.
    • SENDER - Email sender as configured on SES.
    • HOUR - The hour (UTC) the Lambda will run.
    • MINUTE - The minute (UTC) the Lambda will run.
    • sesarn - your preconfigured AWS SES arn.
  5. The deployment will generate a report.
  6. Check your email inbox.

Security

See CONTRIBUTING for more information.

License

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

config-daily-report's People

Contributors

amazon-auto avatar begimher avatar czantoine avatar dbbegimh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

config-daily-report's Issues

Code needs to be updated with latest node version.

While deploying this solution, i am getting below error which is due to older version of node.

Received response status [FAILED] from custom resource. Message returned: Error: Cannot find module 'aws-sdk' Require stack: - /var/task/index.js - /var/task/entrypoint.js - /var/runtime/index.mjs at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Module._load (node:internal/modules/cjs/loader:985:27) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at Object. (/var/task/index.js:1:117) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Module.require (node:internal/modules/cjs/loader:1235:19) (RequestId: 6f01d6bb-461a-4bad-840a-27e95dab7f5e)

Please update your code to overcome this issue.

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.