Giter VIP home page Giter VIP logo

eda-workflow's Introduction

Template Repository: AWS Lambda microservice

Tools

Application IaaC
Tool Python Terraform
Version 3.9 1.5.2 (AWS)

Setup

The goal of this template is to provide:

  • python linters setup (black, isort, flake8) using pre-commit
  • python microservice structure using aws_lambda_powertools
  • testing setup using pytest
  • Cloud infrastructure (AWS) using IaaC (Terraform)
  • Terraform linters
  • Github Actions workflows to run tests, linters and execute Terraform

Usage

Clone the repository to your local machine.

Python setup

Create a virtual environment

python -v venv .venv
source .venv/bin/active

Install dependencies:

python -m pip install -r requirements-dev.txt

Pre-commit

pre-commit install
pre-commit run --all-files

This will run black, flake8, mypy, and Terraform linters on all files in the repository.

Terraform setup

Navigate to the infra/terraform directory and run terraform init to initialize the Terraform configuration.

cd infra/terraform
terraform init

These commands will create the infrastructure specified in the Terraform configuration.

terraform plan
terraform apply

Run pre-commit for the Terraform configuration

Install tflint: https://github.com/terraform-linters/tflint

pre-commit run -a terraform

Testing

To run the tests, you can use the following command:

pytest

You can also use the -v option to get more detailed output:

pytest -v

eda-workflow's People

Contributors

mich0232 avatar

Watchers

 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.