Serverless Project on AWS

Hemant Risbud
4 min readDec 12, 2023

--

Excited to share my latest AWS project, deeply rooted in the power of serverless architecture! Leveraging in project GitHub, Serverless Framework (EC2), CloudWatch, S3, DynamoDB, Lambda, and IAM, here’s a breakdown:

🔧 Tech Stack Utilization:

EC2: Hosting the serverless infrastructure, optimizing resource utilization and scalability.
S3: Storing and managing Lambda functions, ensuring easy access and version control.
DynamoDB: Fueling serverless resources, allowing for flexible and efficient data storage.
Lambda: Crafting robust CRUD functions, driving dynamic operations.
IAM: Managing permissions and access control, ensuring secure interactions.

🛠️ AWS Lambda: The Heart of Serverless AWS Lambda allows you to run code without provisioning or managing servers. Here’s how it works within a serverless context:

  1. Event-Driven Execution: Lambda executes functions in response to events (HTTP requests, file uploads, database changes, etc.). This event-driven approach enables a pay-as-you-go model.
  2. Auto-Scaling: Lambda automatically scales based on incoming traffic. It handles load balancing and ensures that functions run in parallel to meet demand.
  3. Multiple Language Support: Lambda supports various programming languages like Node.js, Python, Java, Go, and .NET, allowing flexibility in coding.
  4. Integration with AWS Services: It seamlessly integrates with other AWS services, such as S3, DynamoDB, API Gateway, SNS, SQS, etc., enabling a modular and versatile ecosystem.

🌐 Serverless Applications on Lambda:

  1. Microservices Architecture: Lambda facilitates the creation of microservices-based architectures. Each function can handle a specific task, promoting modularity and easier maintenance.
  2. Cost Efficiency: You only pay for the compute time consumed by your functions, making it cost-effective for sporadic or unpredictable workloads.
  3. Scalability and Resilience: Lambda automatically scales to match the incoming request rate. This design inherently builds resilience by handling traffic spikes without intervention and and triggers through simple abstract syntax in YAML.
  4. Infrastructure Management: AWS takes care of server management, OS patching, and scaling. Developers can focus solely on writing code without worrying about underlying infrastructure.
  5. Deployment and Versioning: Lambda supports versioning and aliases, allowing easy rollback to previous versions in case of issues and enabling A/B testing.
  6. Security: IAM roles can be assigned to Lambda functions, ensuring granular control over permissions and securing access to AWS resources.
  7. Monitoring and Logging: Integration with CloudWatch enables logging of function invocations, errors, and performance metrics for better monitoring and debugging.

🌐 Serverless at its Core:

EC2 Empowering Serverless: Embracing EC2 to run a serverless application, optimizing cost and performance.
GitHub Integration: Seamless code deployment via GitHub repository, facilitating continuous integration and deployment.
S3 Function Repository: Centralizing Lambda functions within S3, fostering a modular and scalable environment.
Dynamic DynamoDB Tables: Utilizing serverless resources to create and manage DynamoDB tables, adapting to evolving data needs.
🛠️ Key Components:

API Gateway Accessibility: Offering users access to Lambda functions via an API Gateway, ensuring a user-friendly CURD experience.
CloudWatch Integration: Logging Lambda function activities in CloudWatch, streamlining monitoring and troubleshooting.

CODE: https://github.com/rootmeet/aws-node-http-api-project

dashboard: https://app.serverless.com/<AWS>/apps/aws-node-http-api-project/aws-node-http-api-project/dev/<region>
endpoints:
GET — https://<>.execute-api.us-west-1.amazonaws.com/
POST — https://<>.execute-api.us-west-1.amazonaws.com/kaam
GET — https://<>.execute-api.us-west-1.amazonaws.com/kaam
PUT — https://<>.execute-api.us-west-1.amazonaws.com/kaam/{id}
DELETE — https://<>.execute-api.us-west-1.amazonaws.com/kaam/{id}
functions:
namaskar: aws-node-http-api-project-dev-namaskar
kaamBhara: aws-node-http-api-project-dev-kaamBhara
kaamDakhava: aws-node-http-api-project-dev-kaamDakhava
kaamSampava: aws-node-http-api-project-dev-kaamSampava
kaamKadhunTaka: aws-node-http-api-project-dev-kaamKadhunTaka

Verified using postman- a user-friendly interface to design, test, and document APIs

Serverless — Lambda functions architecture

--

--

Hemant Risbud

Software Engineer with focus on Cloud & DevOps | AWS | Microsoft Azure | Google Cloud | Oracle Cloud