Skip to content

Serverless AWS project using Terraform. Creates scalable CRUD application with Lambda, API Gateway, and DynamoDB. Implements secure VPC, IAM roles, and network configurations. Automates infrastructure deployment, enabling dynamic, cost-effective cloud solution with comprehensive data management capabilities.

Notifications You must be signed in to change notification settings

Reeteshrajesh/Lambda_terraform_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless AWS CRUD Application

This serverless project leverages AWS and Terraform to create a robust, scalable CRUD application. By utilizing AWS Lambda, API Gateway, and DynamoDB, the solution provides a fully managed, cost-effective infrastructure for data management. The application enables seamless retrieval, creation, updating, and deletion of items through RESTful API endpoints. Implemented with Node.js, the Lambda function handles core business logic while Terraform manages infrastructure deployment, ensuring reproducible and secure cloud environments. The architecture includes a custom VPC with public and private subnets, IAM roles, and security groups, offering comprehensive network isolation and precise access controls. Designed with cloud-native principles, the project demonstrates automatic scaling, reduced operational complexity, and efficient resource provisioning, making it an exemplary model of modern serverless application development.

👤 Author Profile

Reetesh Kumar

🚀 Project Overview

A comprehensive serverless application demonstrating modern cloud infrastructure deployment using Terraform, AWS Lambda, API Gateway, and DynamoDB.

📋 Table of Contents

🛠 Prerequisites

Technical Requirements

  • AWS Account
  • AWS CLI (latest version)
  • Terraform (v1.0+)
  • Git
  • Node.js (v16+)

Account Preparations

  1. Create AWS IAM User
  2. Generate Access Keys
  3. Configure AWS CLI
  4. Install required tools

🔧 Project Setup

1. Repository Cloning

git clone https://github.com/Reeteshrajesh/Lambda_terraform_project
cd Lambda_terraform_project

2. AWS Configuration

# Configure AWS Credentials
aws configure

# Enter:
# - AWS Access Key ID
# - AWS Secret Access Key
# - Default Region (e.g., us-west-2)
# - Output Format (json)

3. Terraform Initialization

# Initialize Terraform
terraform init

# Validate Configuration
terraform validate

# Plan Infrastructure
terraform plan

🌐 Infrastructure Details

Network Configuration

  • Region: us-west-2
  • VPC CIDR: 10.0.0.0/16
  • Subnets:
    • Public Subnet: 10.0.1.0/24
    • Private Subnet: 10.0.2.0/24

Serverless Components

  • Lambda Function
  • API Gateway
  • DynamoDB
  • IAM Roles
  • Security Groups

🚀 Deployment Steps

Full Deployment

# Apply Terraform Configuration
terraform apply

# Confirm with 'yes'

Verify Deployment

  1. Check AWS Console
  2. Validate Lambda Function
  3. Test API Gateway
  4. Inspect DynamoDB Table

📡 API Endpoints

Supported Methods

  • GET /items: List all items
  • POST /items: Create new item
  • PUT /items: Update existing item
  • DELETE /items: Remove item

📊 Monitoring

AWS CloudWatch

  • Lambda Execution Logs
  • Performance Metrics
  • Error Tracking

Services Monitored

  • Lambda Function
  • API Gateway
  • DynamoDB

🔒 Best Practices

Security

  • Implement least privilege
  • Use IAM roles
  • Secure network configuration
  • Regular credential rotation

Development

  • Use .gitignore
  • Avoid committing sensitive files
  • Implement input validation
  • Error handling

🛠 Troubleshooting

Common Issues

  • Verify AWS credentials
  • Check Terraform version
  • Ensure network connectivity
  • Review IAM permissions

Debugging Steps

  1. Validate AWS CLI configuration
  2. Check Terraform state
  3. Inspect CloudWatch logs
  4. Verify network settings

🧹 Infrastructure Cleanup

# Destroy All Resources
terraform destroy

📄 License

MIT License

🙏 Acknowledgments

  • Terraform Community
  • AWS Documentation
  • Open Source Contributors

📞 Support

For issues or questions, please open a GitHub issue or contact the author.

About

Serverless AWS project using Terraform. Creates scalable CRUD application with Lambda, API Gateway, and DynamoDB. Implements secure VPC, IAM roles, and network configurations. Automates infrastructure deployment, enabling dynamic, cost-effective cloud solution with comprehensive data management capabilities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published