Skip to content

Terraform module that deploys a AWS lambda function and a DynamoDB table.

License

Notifications You must be signed in to change notification settings

non-existing-organization/terraform_module_lambda_dynamodb

Repository files navigation

Contributors Forks Stargazers Issues GPL3 License LinkedIn Ask Me Anything


Terraform Logo

terraform_module_security_group_checker

Terraform & python pet project to monitor & store AWS security group IDs in a DynamoDB table that fall into certain criteria
Explore the docs »

Report Bug · Request Feature

Table of Contents

About The Project

This is a simple terraform module that deploys an Lambda function and a DynamoDB table and the necessary IAM permissions to allow interaction between them. Inside this same module there's a simple example of how the module is invoked and a simple python script that scans the Security Groups in the region and stores any SG with a "0.0.0.0/0" rule in the DynamoDB table.

The user must provide it's own script, runtime and source code hash.

Built With

  • Terraform
  • Python
  • AWS services (DynamoDB, IAM, Lambda, Cloudwatch)

Getting Started

Prerequisites

  • Terraform: Deployed with version 1.0.6
  • Python: AWS lambda runtime with version 3.8

Installation

  • Install Terraform

https://learn.hashicorp.com/tutorials/terraform/install-cli

  • Install AWS cli and configure your AWS credentials (you should have a AWS account already)

https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html


Usage

The whole solution will be deployed via terraform

terraform init
terraform plan
terraform apply 

There's a locals block in the main.tf file to modify a couple of fields that are consumed by several parts of the project. The table name, attribue name for that table and schedule expression that defines the rate of how frequent the Cloudwatch event rule executes the lambda function.


Roadmap

See the open issues for a list of proposed features (and known issues).


Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Contact

Santiago - [email protected]


Acknowledgements

About

Terraform module that deploys a AWS lambda function and a DynamoDB table.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published