Code: 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")
@akinadewole696
2 жыл бұрын
Hi, thanks for this video, it actually very helpful on something I am currently trying my hands on, are you able to help with how I can use the same process to send bulk email?
@KnowledgeAmplifier1
2 жыл бұрын
@@akinadewole696 sorry for the late reply , but if you are still looking for solution , then simply call the SendEmail API repeatedly for each email you would like to send or else you can use AWS Pinpoint service 😊 Here is a detail demo on sending multiple mails using this very popular service widely used for marketing -- kzitem.info/news/bejne/yK2PzpqthICjlag Happy Learning
@hamids2065
2 жыл бұрын
Very nice, well explained, the beauty is in the clear and simple instructions without missing any steps, and you created everthing from scratch very nicely. Thanks
very well explained. keep posting these kind of video
@KnowledgeAmplifier1
Жыл бұрын
Thank you for your feedback Neeraj! I'm glad you found the video helpful. I'll definitely keep posting more videos like this in the future. Stay tuned!
@hongcai4617
Жыл бұрын
Thank you for video, very infomative and the code is very useful to start a SES project
@KnowledgeAmplifier1
Жыл бұрын
Glad to know the video is helpful to you Hong Cai! Happy Learning
@sunilmadekar321
Жыл бұрын
its really helpful and simple content. Thanks
@KnowledgeAmplifier1
Жыл бұрын
Thank You Sunil Madekar! Happy Learning
@Vikaskumar-ur5di
2 жыл бұрын
thanks for sharing easy and clean method
@KnowledgeAmplifier1
2 жыл бұрын
Most welcome Vikas kumar😊Happy Learning :-)
@Vikaskumar-ur5di
2 жыл бұрын
@@KnowledgeAmplifier1 please start complete series devos
@rajshreesahu4956
2 жыл бұрын
Thank you so much✌️
@KnowledgeAmplifier1
2 жыл бұрын
You are Welcome Rajshree Sahu! Happy Learning :-)
@padmanabhkale9385
2 жыл бұрын
Thank you very much, very much needed video..!!!!!!!!
@KnowledgeAmplifier1
2 жыл бұрын
Glad it was helpful Padmanabh Kale! Happy Learning :-)
@padmanabhkale9385
2 жыл бұрын
@@KnowledgeAmplifier1 could you please let me know how to integrate it with Amazon connect
@anivesh7769
2 жыл бұрын
Have any other process if i dont verify the reciver mail to send the mail
@KnowledgeAmplifier1
2 жыл бұрын
Hello AnIvEsH , sorry for the late reply , but if you are still looking for solution , then yes , it's possible to send mail without verifying the recipients in amazon ses . Your SES account is in Sandbox Mode. You need to open a request with AWS to take your SES account out of Sandbox Mode. You can follow this documentation to raise request -- docs.aws.amazon.com/ses/latest/dg/request-production-access.html Here I demonstrated how to send mail without verifying the destination mail address using AWS Pinpoint -- kzitem.info/news/bejne/yK2PzpqthICjlag Hope this will be helpful ! Happy Learning
@akinadewole696
2 жыл бұрын
Hi, thanks for this video, it actually very helpful on something I am currently trying my hands on, are you able to help with how I can use the same process to send bulk email?
@KnowledgeAmplifier1
2 жыл бұрын
Hello Akinjide Adewole , sorry for the late reply , but if you are still looking for solution , then simply call the SendEmail API repeatedly for each email you would like to send or else you can use AWS Pinpoint service 😊 Here is a detail demo on sending multiple mails using this very popular service widely used for marketing -- kzitem.info/news/bejne/yK2PzpqthICjlag Happy Learning
@uppalaadarsh3261
Жыл бұрын
Hi I have a requirement Calling SES email from Java lambda which is vpc Can you please help me..
@KnowledgeAmplifier1
Жыл бұрын
Hello uppala adarsh, I work with Python & PySpark , left working with Java long back , so don't have any video on Java with SES , but you can refer this documentation which contain all codes on SES Java Integration -- docs.aws.amazon.com/code-samples/latest/catalog/code-catalog-javav2-example_code-ses.html Hope this will be helpful! Happy Learning
@DevOpsPulse
2 ай бұрын
Thank you
@KnowledgeAmplifier1
2 ай бұрын
You are welcome @DevOpsPulse! Happy Learning
@atulkumar7030
2 жыл бұрын
the destination email needs to be verified ??
@KnowledgeAmplifier1
2 жыл бұрын
yes , if your SES account is in Sandbox Mode. If you want to send mail without verifying the recipients in amazon ses , then need to open a request with AWS to take your SES account out of Sandbox Mode. You can follow this documentation to raise request -- docs.aws.amazon.com/ses/latest/dg/request-production-access.html Here I demonstrated how to send mail without verifying the destination mail address using AWS Pinpoint -- kzitem.info/news/bejne/yK2PzpqthICjlag Hope this will be helpful ! Happy Learning
@sarulatha7374
2 жыл бұрын
Hi, Thanks for this awesome video.. Could pls share a java code for this instead of python...??
@KnowledgeAmplifier1
2 жыл бұрын
Currently no saru latha , I mostly work in Python Language ! You can check in Google.. Happy Learning :-)
@nurulhidayah4263
Жыл бұрын
Hi, i have a question. Is there any way for me to sent mail to many addresses without the recipient notice that I sent the email to many people in a time ?
@veerachegu
2 жыл бұрын
I am getting param validation error
@yuvanshankarn.v9564
2 жыл бұрын
Can we send any other method without using domain
@KamisettyLakshmichaitrik-rs9lz
Жыл бұрын
It is showing an error in the lambda function code can you please send the correct code
@KnowledgeAmplifier1
Жыл бұрын
Kamisetty Lakshmi chaitrika I sent the same code which I used in the video 😅Can you please let me know what error are you getting ?
@lalithavarma5973
Жыл бұрын
We are getting errormeassage: "records" , "ErrorType": "keyError",
@KnowledgeAmplifier1
Жыл бұрын
@@lalithavarma5973 KeyError exception is what is raised when you try to access a key that isn’t in a dictionary (dict). Check whether in cloudwatch logs the filename , bucket name etc. are getting printed properly or not ... if required add an extra print statement before file_name = event['Records'][0]['s3']['object']['key'] line and print the event for which the Lambda is getting triggered , that will help you in debugging ...
@yashvinagpal753
8 ай бұрын
Can you provide the exact print statement which needs to be added. I am also facing the same error.
Пікірлер: 43