Тёмный

Using AWS Lambda with Amazon CloudWatch Events | Send notification when ec2 stops 

Knowledge Amplifier
Подписаться 28 тыс.
Просмотров 8 тыс.
50% 1

Amazon CloudWatch events help you to respond to state changes in your AWS resources.
When your resources change state, they automatically send events into an event stream.
You can create rules that match selected events in the stream and route them to your AWS Lambda function to take action.
For example, you can automatically invoke an AWS Lambda function to log the state of an EC2 instance or AutoScaling group.
In this video , I demonstrated the same
Steps :
Step 1: Create IAM (SES access & cloudwatch access)
Step 2: Create EC2 instance(Prod)
Step 3: Mail Verification from SES
Step 4: Create Lambda Function
Step 5: Create Cloudwatch Event trigger
Check this playlist for more AWS Projects in Big Data domain:
• Demystifying Data Engi...

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@ShrutiDeora-hn7qt
@ShrutiDeora-hn7qt Год назад
Hello can i get the message like when ec2 is started and stopped. Like attention please mail from aws lambda your ec2 state is stopped and when it changes the state getting the mail like ec2 state is start now
@kcbrown4031
@kcbrown4031 Год назад
good evening i used your step but still having an error message
@KnowledgeAmplifier1
@KnowledgeAmplifier1 Год назад
Hello Kcbrown40, I'm sorry to hear that you're experiencing an error message despite following the steps. I'd be happy to help you troubleshoot and resolve the issue. Could you please provide more details about the error message you're encountering? This will allow me to assist you more effectively.
@vishnuprasad.m9627
@vishnuprasad.m9627 Год назад
Thanks for this video. It really helped me for my project.
@KnowledgeAmplifier1
@KnowledgeAmplifier1 Год назад
You're welcome Vishnu prasad.M! I'm glad to hear that the video was helpful for your project. Happy Learning
@muhammadfatahhirzadaulay4430
hello, can I use a group email address as a sender?
@bishnupriyamukherjee4746
@bishnupriyamukherjee4746 3 года назад
👍👍👍👍👍👍👍👍
@KnowledgeAmplifier1
@KnowledgeAmplifier1 3 года назад
Thank You :-)
@chapaya100
@chapaya100 2 года назад
Super !
@KnowledgeAmplifier1
@KnowledgeAmplifier1 2 года назад
Thank you chapaya100! Happy Learning
@nayanroy13
@nayanroy13 3 года назад
awesome demo!
@KnowledgeAmplifier1
@KnowledgeAmplifier1 3 года назад
☺Thank You !! Happy Learning 😃
@surendrabadireddy4856
@surendrabadireddy4856 Год назад
lambda code please
@KnowledgeAmplifier1
@KnowledgeAmplifier1 Год назад
Hello Surendra badireddy, as of now I don't have the exact code handy , but sharing the code which will sent mail when some file lands in s3 bucket (reference : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-A58eQ-ZanvA.html)-- import json import boto3 def lambda_handler(event, context): file_name = event['Records'][0]['s3']['object']['key'] bucketName=event['Records'][0]['s3']['bucket']['name'] print("Event details : ",event) print("File Name : ",file_name) print("Bucket Name : ",bucketName) subject = 'Event from ' + bucketName client = boto3.client("ses") body = """ This is a notification mail to inform you regarding s3 event. The file {} is inserted in the {} bucket . """.format(file_name, bucketName) message = {"Subject": {"Data": subject}, "Body": {"Html": {"Data": body}}} response = client.send_email(Source = "Put the sender's mail id", Destination = {"ToAddresses": ["Put Destination Mail id"]}, Message = message) print("The mail is sent successfully") Please modify the code as explained in the above video ...
Далее
PUBG Mobile СТАЛ ПЛАТНЫМ! 😳
00:31
Просмотров 108 тыс.
Это было очень близко...
00:10
Просмотров 1,3 млн
Using Python to Automate AWS Services | Lambda and EC2
24:10