Complete DevOps Project from Scratch | [Step-by-Step] Serverless Project - AWS

  Рет қаралды 145

DevOps Studio

DevOps Studio

Күн бұрын

Welcome to our comprehensive DevOps tutorial! 🚀 In this video, we walk you through a complete Serverless Project on AWS, starting from scratch. Whether you're a beginner or looking to enhance your DevOps skills, this step-by-step guide is designed to help you build and deploy a serverless application using AWS services.
What You’ll Learn:
1) Introduction to Serverless Computing
2) Setting Up Your AWS Environment
3) Creating Lambda Functions
4) Deploying and Testing Your Serverless Application
5) Monitoring and Scaling with AWS CloudWatch
By the end of this video, you'll have a solid understanding of how to build a fully functional serverless application using DevOps best practices.
Architecture diagram: drive.google.c...
Lambda code:
import boto3
import os
from PIL import Image
from io import BytesIO
s3 = boto3.client('s3')
ses = boto3.client('ses', region_name='us-east-1')
def resize_image(image_data):
image = Image.open(BytesIO(image_data))
image = image.resize((512, 512))
buffer = BytesIO()
image.save(buffer, format="png")
return buffer.getvalue()
def lambda_handler(event, context):
bucket_name = event['Records'][0]['s3']['bucket']['name']
object_key = event['Records'][0]['s3']['object']['key']
Download the image from S3
response = s3.get_object(Bucket=bucket_name, Key=object_key)
image_data = response['Body'].read()
Resize the image
resized_image = resize_image(image_data)
Upload the resized image back to S3
resized_key = f"resized/{object_key}"
s3.put_object(Bucket=bucket_name, Key=resized_key, Body=resized_image, ContentType=response['ContentType'])
Send an email notification
email_response = ses.send_email(
Source='xyz@gmail.com',
Destination={'ToAddresses': ['xyz@gmail.com']},
Message={
'Subject': {'Data': 'Image Processed'},
'Body': {'Text': {'Data': f'Your image has been resized and is available at s3://{bucket_name}/{resized_key}'}}
}
)
return {
'statusCode': 200,
'body': f'Resized image saved to s3://{bucket_name}/{resized_key} and email notification sent.'
}
Don't forget to like, share, and subscribe for more tutorials like this!
#DevOps #Serverless #AWS #Lambda #APIGateway #CloudFormation #Tutorial

Пікірлер: 1
Microservices explained - the What, Why and How?
18:30
TechWorld with Nana
Рет қаралды 917 М.
AWS EC2 Tutorial for Beginners | EC2 Creation - [Full Course]
26:53
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
Почему Катар богатый? #shorts
0:45
Послезавтра
Рет қаралды 2 МЛН
The Complete 2025  Full Stack Developer Roadmap
20:25
TianMeds
Рет қаралды 228
If I Had to Start Learning AWS from Scratch in 2025, Here's What I'd Do
15:55
Tiny Technical Tutorials
Рет қаралды 4,3 М.
Getting Started With AWS Cloud | Step-by-Step Guide
23:54
Travis Media
Рет қаралды 120 М.
Git Tutorial: Fixing Common Mistakes and Undoing Bad Commits
21:31
Corey Schafer
Рет қаралды 386 М.
What Is Serverless?
8:30
Traversy Media
Рет қаралды 181 М.
AWS & Cloud Computing for beginners | 50 Services in 50 Minutes
49:26