Posts

Serverless deployment of web application (part 2) !!!

Image
SERVERLESS DEPLOYMENT OF WEB APPLICATION (PART 2) !! Creating an API to Trigger AWS Lambda & Hosting a Static Web App Using S3 To build a serverless architecture, you can use AWS Lambda for backend processing and Amazon S3 to host a static web app. Triggering Lambda via API Gateway : Create an AWS Lambda function with your required logic. Set up an API Gateway to expose an HTTP endpoint. Integrate the API Gateway with the Lambda function to handle requests. Deploy the API and test it using a client or Postman. Hosting a Static Web App Using S3 : Upload your HTML, CSS, and JavaScript files to an S3 bucket. Enable static website hosting in the S3 bucket settings. Set the correct bucket policy and CORS configuration for public access (if needed). Use CloudFront for improved performance and security. This setup allows you to build scalable web applications with minimal infrastructure management.  Do search for the amazon "API Gateway" in the ...

Serverless Deployment of web application (PART 1)

Image
 SERVERLESS DEPLOYMENT OF WEB APPLICATION !! What is Serverless? Serverless computing allows developers to build applications without managing infrastructure. While servers exist, they are managed by cloud providers like AWS. This lets developers focus more on writing code rather than handling infrastructure. Need for Serverless Better Scalability: Automatically handles traffic spikes. Auto Provisioning: No need to manually allocate resources. Cost Optimization: Pay only for the resources used, not for idle servers. Traditional vs. Serverless Deployment In a traditional setup using EC2, we manage CPU, RAM, and storage. Even if the application receives low traffic, we must pay for the full server capacity. With serverless, resources are allocated dynamically based on demand, reducing costs. This guide is divided into two parts: Part 1: Setting up a DynamoDB table and AWS Lambda function. Part 2: Creating an API to trigger the Lambda function and hosting a static web application u...