Skip to content

Automated Python Lambda Deployment with Terraform and GitLab CI, managing multiple Python files for serverless functions.

Notifications You must be signed in to change notification settings

anshumanthakur/PyLambdaDeploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AWS Serverless Infrastructure with Terraform

Terraform Logo

This repository contains Terraform configurations and code for setting up a serverless infrastructure on AWS. The infrastructure includes AWS Lambda functions, AWS CloudWatch Event Rules, and other resources. It also demonstrates best practices for managing AWS infrastructure as code (IaC) using Terraform.

Key Highlight: Deploy multiple Python files under a single Lambda function, allowing you to organize your Lambda code efficiently while maintaining a modular and maintainable architecture.

Table of Contents

Getting Started

Before you begin, make sure you have the necessary prerequisites and AWS credentials configured.

Prerequisites

  • Terraform installed locally.
  • AWS account with appropriate permissions and AWS CLI configured.

Terraform Modules

This repository uses custom Terraform modules to provision resources. The modules are located in the tf-modules directory. Each module is designed to manage specific AWS resources, making it easy to organize and maintain your infrastructure.

  • tf-modules/lambda: Manages AWS Lambda functions and their associated resources.
  • tf-modules/cloudwatch: Manages AWS CloudWatch resources, including event rules.

Deployment Steps

  1. Clone this repository to your local machine:

    git clone https://github.com/your-username/your-repo.git
    cd your-repo
  2. Update the Terraform variables and configuration files as needed. Ensure that you replace sensitive information such as AWS access keys with environment variables or use a secure method to manage secrets.

  3. Initialize Terraform and download the required providers: terraform init

  4. Review the action plan terraform plan

  5. Apply the Terraform configuration to create or update AWS resources: terraform apply

  6. Verify that the resources have been provisioned correctly in your AWS account.

Usage

This infrastructure can serve as a starting point for your serverless applications on AWS. Customize the Terraform configurations and modules to match your specific requirements. Additionally, you can extend the infrastructure to include additional AWS services and resources as needed.

About

Automated Python Lambda Deployment with Terraform and GitLab CI, managing multiple Python files for serverless functions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published