Deploying Serverless Web Application on AWS: S3, API Gateway, Lambda, DynamoDB, and CloudFront

preview_player
Показать описание
In this comprehensive tutorial, you'll learn how to deploy a serverless web application on AWS, leveraging the power of various AWS services. We'll walk through each step, from setting up an S3 bucket to hosting your static web content, configuring API Gateway to trigger Lambda functions for handling GET and POST requests to interact with a DynamoDB database, and finally, securing your application using CloudFront.

Here's a breakdown of what we'll cover:
1. Setting up an S3 Bucket**: We'll create an S3 bucket to host our static web content, including HTML, CSS, and JavaScript files.

2. Configuring API Gateway: You'll learn how to configure API Gateway endpoints to trigger Lambda functions. We'll cover both GET and POST methods to interact with our DynamoDB database.

3. Creating Lambda Functions: We'll write Lambda functions in Python to handle the API Gateway requests. For example, we'll create functions to retrieve data from DynamoDB and insert new data into it.

4. Working with DynamoDB: We'll set up a DynamoDB table to store our data. You'll learn how to define the table schema and perform CRUD operations using Lambda functions.

5. Implementing Secure Connections with CloudFront: To ensure secure access to our web application, we'll deploy CloudFront as a content delivery network (CDN). We'll configure CloudFront to serve our S3 content securely over HTTPS, providing encryption in transit and improving the performance of our application.

By the end of this tutorial, you'll have a fully functional serverless web application deployed on AWS, capable of securely handling user requests, storing data in DynamoDB, and delivering content efficiently using CloudFront.

Join me on this journey to mastering serverless architecture on AWS and take your web development skills to the next level! Don't forget to like, share, and subscribe for more AWS tutorials and tips. Let's dive in!

SOCIALMEDIA:

Thanks For Watching..
Рекомендации по теме
Комментарии
Автор

Thank you for this project!! It is working Very Insightful
Now many people are getting error in different stages I will explain how i did troubleshooting:
1. Everyone while you are creating dynamodb table and partition key please keep name as shown in video otherwise you will have to make changes in scripts applicable only if you are using code from this video.
2. I have created role for lambda function and given them full access to dynamodb and api gateway
3. In get function script do change the region
4. While testing event in lambda for insert function please check format of your json otherwise you will get errors
5. After creating api gateway do add endpoint in js file and do click on deploy.
6. After uploading my files in s3 bucket and attaching policy i was able to open my website but i was not able perform any action as i was getting popup about error. After checking in inspect > console i got cors related error. You have to attach cors policy for you s3 bucket
policy :
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"POST",
"PUT",
"DELETE",
"HEAD"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [
"ETag"
],
"MaxAgeSeconds": 3000
}
]
As for cloudfront i have not gotten any error. That's it!

AP-rntz
Автор

FYI to anyone having issues at the test event around 8:00, he just completely glosses over the fact he had a ready-made role for that function that had the correct permissions. To fix, search for the service IAM at the top bar, go to roles on the left, create role, "use case" is Lambda and next, checkmark the permission "DynamoDBFullAccess", then next and name it something lambda+dynamo related and create role. then go back and follow his video but when it gets to the role field choose the one you made.

Belgariad
Автор

This project was so well-explained and on-point, I understood every service easily with your help. So glad I decided to watch this video and there was no minute of dissatisfaction. Please keep growing and sharing such valuable projects on cloud !!

ritikasharma_
Автор

Finnally it works. Thank you for this project.
If your getting error while invoking from website then you must enable cors for your API and then click on deploy api option. In my case i just enable cors but not deployed the api due to which it was not working. When you make any changes, you must deploy it.
Even if you are getting error then enable cloudwatch logs for API. In my case it helps a lot.

gunjannimbalkar
Автор

This is great tutorial. now I understand serverless architecture very well.

CloudTechExpert
Автор

Man, you are good. Simple and straight. I created a role allowing DynamoDB and API full access and attached it to my functions.
It works.

ndipsamuel
Автор

Exactly what i needed. No bakwas, directly on point.

yugalsinha
Автор

thank you brother ...and goodluck. im from japan

techlock
Автор

Good content..., Really appreciate your efforts

karthickrajam
Автор

You are good brother, don't get nervous inbetween. You will improve in expressing yourself.

Video was quite informative for beginners. Keep it up 🙌

AbhishekChavan-le
Автор

keep doing more content related to aws man 👏

pranavdipu
Автор

Really liked this mini project. Thank you 😊

Tech-xjkx
Автор

Your tutorial is very helpful . Thanks

modoulaminceesay
Автор

Helpfull
Could you please video using Ansible and Terraform with CI/CD pipepline for same application

bhagyashreeaher
Автор

Nice video and great explanation
One question, why don't you enable WAF ?

chandrasekhar
Автор

am getting student data retrieving error may i know the reason? can anyone provide the solution!!!

thirunavukkarasuthangavelu
Автор

In the section of "Use an existing role", there is no option of lambdaDynamoDB-role . How to create it ? please help .

NishantKumar-bqlr
Автор

can we do the same thing using EC2 as well? if Yes can you do a video on it as well? Thanks!

angeltenshi
Автор

I am not able to save student data and view all students

gopalmasanpally
Автор

can you plz make an video on spring boot RESTAPIS WITH MYSQL Serverless application.

SreenivasaRaju-dx