{"id":389,"date":"2021-11-03T11:01:17","date_gmt":"2021-11-03T11:01:17","guid":{"rendered":"http:\/\/18.141.20.153\/?p=389"},"modified":"2025-08-21T10:12:17","modified_gmt":"2025-08-21T10:12:17","slug":"send-s3-event-notification-email-using-lambda-and-ses","status":"publish","type":"post","link":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/","title":{"rendered":"How to send S3 event notification email using Lambda and SES?"},"content":{"rendered":"<span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">10<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<p><strong><img src=\"https:\/\/lh5.googleusercontent.com\/w7B9voBa9Fs_F2EQuN_PLNdFmMppFOJHdjBtm8qbVGaLKWErRJzMI1xYogENcIw4GXZ8Gnh2khToWkcqPE7UyPYrngAc66EAiyk7Kt0IFuFBq2W9DUUIzpb_WPPHSQ1l3935xqMWiCwiWs709-2STJZrxrBnz4BZzDeX5xIURBSuMc76HGqAErY-\" style=\"width: 1600px;\"><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">Email notifications are an important part of any modern application. In this blog, we will discuss how to send Email notifications using the <a href=\"https:\/\/aws.amazon.com\/ses\/\" target=\"_blank\" rel=\"noreferrer noopener\">Amazon SES<\/a> service and AWS Lambda and will demonstrate how to send an acknowledgment email to a user using AWS Lambda and Amazon SES upon adding new objects in an S3 bucket.<\/p>\n\n\n\n<p>In this blog, we will cover:<\/p>\n\n\n\n<ul><li>What is Amazon SES?<\/li><li>When to use Amazon SES?<\/li><li>Benefits of Amazon SES<\/li><li>Use Cases of Amazon SES<\/li><li>Hands-on &#8211; Send an Email notification (Using SES and Lambda) to the admin when any new objects get added into the S3 bucket<ul><li>Create an S3 bucket (or use an existing bucket)<\/li><li>Create an IAM policy and an execution role (you can either create it by going to the IAM section on the console or you can choose the option of \u2018create a default execution role with basic settings\u2019 while creating a Lambda function)<\/li><li>Verify SES identity Domain OR Email &#8211; Either a domain bought from an external source or bought from AWS Route53. Email verification using the SES console<\/li><li>Create a Lambda function to write code for sending an Email using SES<\/li><li>At last, a trigger to the Lambda function with S3 Bucket as the source initiates its execution while adding a new object.<\/li><li>Add a new object in the S3 bucket and test the entire implementation to check how the Lambda function is invoking SES and sending notification emails.&nbsp;&nbsp;<\/li><\/ul><\/li><\/ul>\n\n\n\n<h2><strong>What is Amazon SES?<\/strong><\/h2>\n\n\n\n<p class=\"has-text-align-justify\">Amazon Simple Email Service (SES) is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application.<\/p>\n\n\n\n<p class=\"has-text-align-justify\">Amazon SES allows you to send and receive emails using our own email addresses and\/or domains and we only pay for what you use. We can use this service for sending both transactional and mass emails. Amazon SES easily integrates with <a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-trigger-lambda-function-using-amazon-cloudwatch-events-and-configure-cloudwatch-alarm-to-get-email-notifications-using-amazon-snspart-2\/\">Amazon CloudWatch<\/a>, <a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-trigger-lambda-function-using-amazon-cloudwatch-events-and-configure-cloudwatch-alarm-to-get-email-notifications-using-amazon-sns-part-1\/\">Amazon SNS<\/a>, <a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-analyze-debug-and-trace-aws-lambda-function-using-aws-x-ray\/\">AWS Lambda<\/a>, <a href=\"https:\/\/www.workfall.com\/learning\/blog\/15-awsome-years-of-amazon-ec2-and-still-going-strong\/\">Amazon EC2<\/a>, <a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-set-up-a-continuous-deployment-pipeline-to-deploy-versions-of-an-application-on-aws-elastic-beanstalk-using-aws-codepipeline-part-1\/\">AWS Elastic Beanstalk<\/a>, AWS IAM, <a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-send-s3-event-notification-email-using-lambda-and-ses\/\">Amazon Route53<\/a>, <a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-fetch-contents-of-json-files-stored-in-amazon-s3-using-express-js-and-aws-sdk\/\">Amazon S3<\/a>, etc.<\/p>\n\n\n\n<p class=\"has-text-align-justify\">You can configure Amazon SES quickly to support several email use cases, including transactional, marketing, or mass email communications. Amazon SES&#8217;s flexible IP deployment and email authentication options help drive higher deliverability and protect sender reputation while sending analytics to measure the impact of each email. With Amazon SES, you can send emails securely, globally, and at scale.<\/p>\n\n\n\n<h2><strong>When to use Amazon SES?<\/strong><\/h2>\n\n\n\n<p class=\"has-text-align-justify\">As and when companies grow in size and in the economy, they sometimes yet rely on methods that don\u2019t make sense anymore. For example, the way businesses process outgoing emails from email clients. Those emails include some essential reminders you might want to send to your customers. If the email is to be forwarded to a large audience (thousands of users), it gets difficult to use Google Gmail or some third-party applications because of the complexity of the infrastructure. This complexity depends on how business scales up or down as the demand changes. Since Amazon SES is designed to handle such scenarios as sending mass emails and providing detailed analysis, the service beats all the other email services in the market.<\/p>\n\n\n\n<h2><strong>Benefits of Amazon SES<\/strong><\/h2>\n\n\n\n<p>Let\u2019s glance over the following major benefits of Amazon Simple Email Service one by one:<\/p>\n\n\n\n<p><strong>High Deliverability<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">Amazon SES provides you with Content filtering technologies, allows you to use dedicated IP, and comes with a fully secured dashboard to provide end-to-end analysis thus ensuring that messages reach your customers\u2019 inboxes.<\/p>\n\n\n\n<p><strong>Cost-Effective<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">SES provides you with the flexibility of pay as you go, and pay just for what you utilize. It doesn\u2019t charge you with any upfront fees, negotiations, advance payments, and no minimum charges. Amazon SES offers 62,000 emails each month for free sent from an application hosted on Amazon EC2.<\/p>\n\n\n\n<p><strong>Configurable<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">You can make use of the Rule Sets to make rules for the emails you send using Amazon SES. For example, create rules to store emails received in an Amazon S3 bucket or rules for Amazon CloudWatch to provide a more detailed analysis.<\/p>\n\n\n\n<p><strong>Reliable<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">Amazon SES runs on an extremely reliable Amazon Internet Services Infrastructure. There are numerous data centers and redundant systems that make sure to provide the highest levels of availability.<\/p>\n\n\n\n<p>Apart from the above-mentioned major benefits, Amazon SES also provides the following benefits:<\/p>\n\n\n\n<ul><li>Ease of use<\/li><li>Interact with customers at scale<\/li><li>Optimization of delivery of emails<\/li><li>Increase the effectiveness<\/li><li>Communication easy with the use of automated replies<\/li><li>Scaling capabilities without any manual intervention<\/li><\/ul>\n\n\n\n<h2><strong>Use Cases of Amazon SES<\/strong><\/h2>\n\n\n\n<p>There are many such applications of AWS SES, let\u2019s discuss some of them:<\/p>\n\n\n\n<p><strong>Transaction Acknowledgment Emails<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">Amazon SES provides us with the ability to send automated emails to users which might include purchase information or shipping status notifications, etc.<\/p>\n\n\n\n<p><strong>Email Receival<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">Users can configure Amazon SES in such a way that it can perform an action on an email received. For example, emails sent to Amazon SES can be configured to be stored in an S3 bucket which in turn will trigger a lambda function to perform some other execution or Amazon SES can also be configured in such a way that on an email receival, it can trigger the execution of a lambda function.<\/p>\n\n\n\n<p><strong>Health Check Notifications<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">Amazon SES can also be configured and integrated easily with a service such as Elastic Beanstalk. For example, on any change in the health status of an application hosted on Elastic Beanstalk, Amazon SES can send emails alerting the user of the health status at each deployment stage.<\/p>\n\n\n\n<ol><li>Lambda function is invoking SES and sending notification emails.&nbsp;&nbsp;<\/li><\/ol>\n\n\n\n<h2><strong>Let\u2019s do hands-on:<\/strong><\/h2>\n\n\n\n<p class=\"has-text-align-justify\">Let\u2019s work on the scenario where we want to send a notification email to an admin when any user is uploading a new image in the S3 bucket. S3 acts as one of the triggers for AWS Lambda. We will use the Lambda function to write the code to send an acknowledgment email using Amazon SES.&nbsp;<\/p>\n\n\n\n<p>To implement this, we will do the following:<\/p>\n\n\n\n<ol><li>Create an S3 bucket (or use an existing bucket)<\/li><li>Create an IAM policy and an execution role (you can either create it by going to the IAM section on the console or you can choose the option of \u2018create a default execution role with basic settings\u2019 while creating a Lambda function)<\/li><li>Verify SES identity Domain OR Email &#8211; Either a domain bought from an external source or bought from AWS Route53. Email verification using the SES console<\/li><li>Create a Lambda function to write code for sending an Email using SES<\/li><li>At last, a trigger to the Lambda function with S3 Bucket as the source initiates its execution while adding a new object.<\/li><li>Add a new object in the S3 bucket and test the entire implementation to check how&nbsp;<\/li><li>Go to the S3 Console and click on <strong>Create Bucket<\/strong> as shown in the below screenshot:&nbsp;<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/17mja1tw2lxrQdD35HZ9-DUsYtc0_tIjh0szd26pbdQZCvkgBLbQzrWSWWATZKpZsaQ5YxAOgGQJgAoBSgoYx8Z0JaB6j415FnQkfrcDTQbXzIk-DnLTZtBCb11HBfqkc4maGicqYCoZIJWdIg7cdEQnNdf4h6Bh7RfpYs9dTUYbkgnMeee387uC\" alt=\"\"\/><\/figure>\n\n\n\n<ol start=\"8\"><li>Enter a name for the bucket. You can disable the \u2018Block all public access\u2019 checkbox if you want your bucket to be public. Also, you can add tags for objects added in the bucket or you can enable Bucket Versioning if required.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/5dYUqJlZdFT1hEfkF__S_GfT9dRU5IZIdeXkaFwPOzVs8WCvsygKjoT9Z-XESqjMWBqo18WMP84DCO39-_mHk24rtCJz5RI9xYDYfHQSHV-sl1FlTo2kQFPsycuRZdq2JMZLQUr0Yd8aj2yWPRfJ2vvzEvR9se5vHGQce65u0GNjP8SreWFoLNkI\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">We are not enabling Bucket versioning and not adding any tags as of now. Click on <strong>Create Bucket<\/strong> as shown in the below screenshot.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/kBhyO24aBhKXXqRaVTDdIegODGwZ_wEwaisrTTNbSAp6UIAeNfu4N4wr2e56u3rrHakIxy0HKacZgTCDEAFnEO6jngv1W8dyMqfWlCwtXemCFJ_MYA5h_HIis67KHhhVqJqnxdgOLBEnaSZZTXPmvu2twM9qgQjrb6wsqsaiYRwPZ-7KcQHaK3DZ\" alt=\"\"\/><\/figure>\n\n\n\n<p>and you will see the bucket created as shown in the below screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/f2o6yEmTANgFQ3BM16eRWQdkw80ca8wSAZLxMVG6IlVCcigfMYgKKvmT4GC3yRU0S90cyHNXc8eA8gtLcxGOFOIQQN9KrKZOhCl9HO7v8zsy-x8HvP3ZWLjWyPUr4trFOn6_KeO-hAkZHraQyBKZ8lIpUyog-GLc0jaaMgIOb4_M7mzQg4HYBrFL\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>Now, go to the IAM Console on AWS.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/KeWA-ocfhqWNjyYVC3pm6Im6bF4XVaXzKQOhfOyOfXTPvQzMfu5iS2rPTGLY6wiF9V4ocgpEtVk3M9EeVZAsTwuEWRH5cU2W2NV7m3mxXR38dFFvpCjU4pZ0xMuB_eTTCjNflOhdlnKnkEw3UZ45kEqrXory9IpGb4qPC3ZIBxCBNpSMBaBoQtck\" alt=\"\"\/><\/figure>\n\n\n\n<p>Under roles, create on <strong>\u2018Create role\u2019<\/strong>, choose <strong>\u2018Lambda\u2019<\/strong> and click on <strong>Next:Permissions<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/Lw5zziQPAcrrXmDuhJ3OqkJADpfwCcoNj7C5dIL46Tw8yh8FHyASBIVpgBnTIM9nrYXLfXc8lhH6TmqwgcafyyBy7hfWgR9Tteq0BkeLcnjtRYr5R4SYdm2Di9Ag5O7g1xGsBSEES9iy26770O8lATV9Mdsx3ORSuC0_dgq6JBCBQUBNEItvdhZK\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Based on the AWS best practices, it is suggested that you create a policy with only the required permission. Click on <strong>Create policy <\/strong>as shown in the following screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/MuFafEeWTDhIJq__tyLo5F-sOj5HkjVic2o_gd_h6fORqJn-7Mpq8jGtXR94OLJAfPexgZLVQTMdPAbN9a3U2pWIaXHsk_hrLhRITzoHhAk7b5ZgJnpcTGP-SU-bCKtfAVgnDL4-Hx64rqFt5lNa_wWbHy4x446o2Ii2U8aUyq1QOKibDzE6hL0e\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Under JSON, add the following JSON as given below. Rename \u2018mybucket\u2019 to the bucket name you created above and click on \u2018Review Policy\u2019.&nbsp;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n    &quot;Version&quot;: &quot;2012-10-17&quot;,\n    &quot;Statement&quot;: &#91;\n        {\n            &quot;Effect&quot;: &quot;Allow&quot;,\n            &quot;Action&quot;: &#91;\n                &quot;logs:PutLogEvents&quot;,\n                &quot;logs:CreateLogGroup&quot;,\n                &quot;logs:CreateLogStream&quot;\n            ],\n            &quot;Resource&quot;: &quot;arn:aws:logs:*:*:*&quot;\n        },\n        {\n            &quot;Effect&quot;: &quot;Allow&quot;,\n            &quot;Action&quot;: &#91;\n                &quot;s3:GetObject&quot;\n            ],\n            &quot;Resource&quot;: &quot;arn:aws:s3:::mybucket\/*&quot;\n        },\n        {\n            &quot;Effect&quot;: &quot;Allow&quot;,\n            &quot;Action&quot;: &#91;\n                &quot;ses:SendEmail&quot;,\n                &quot;ses:SendRawEmail&quot;\n            ],\n            &quot;Resource&quot;: &quot;*&quot;\n        }\n    ]\n}         \n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/1GB_nqlaCsbnAnbAt44svpwZcuJhZeNQmt2nUdZZtbG5mNRooyo9svAMYnU4I-7enxiyAUCq4PDlc7Qogiqm2FaPugj3tGYJNumOJf59QTw8-TjCg2cqbHxQqfh_ZFkPuYx2dz29JP2gVr6HREEL-4l6c5LtG2D5EXdmHgdeh6zfT9rf_CVKgYbh\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>Give a name to the policy and click on <strong>Create Policy<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/bRIamqHRb7rJEHKuPotgcUmr4FOOQgXvWy2ay8l_tWYhgiqp3tDsQaQUFRhs8QfOEXUzGz7yrqXXGoaXG5H3HXVcDXt0SLf7q_ljUCis_EXh9VfXgTT8LQPmhvOUjDOEg6kmN3MkCHUpA0Ss4jp5tZBesy_GDsfuGAZUVmAg7872sU7rqTMgLDKK\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Upon the creation of the policy, go back to the tab where you were creating an execution role and click on the \u2018refresh\u2019 button. Search for the policy you just created and attach the newly created policy to the role and click on <strong>Next: Tags.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/tDXdmrP7M-oH5ONafOsrFntanithidq35L1tyPzfN7e89bZKeqepRT7agR8vnLXDXIRPDdD5mffC70mdwIZN7vBBSDxSRskEpUjulFD4Uzdg9y1Ql-JspQt6po0kS1izRJEpH1CBCtJru4vi9LtDJwvYscuAP9Ho8z8yXM9-MgEwqX5zcFaTegRj\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>Enter Tags (key\/value) if any. In this blog, we will not add any tag and click on <strong>Next: Review.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/onIm5Z8LKCO4ryKPnQ4JTOxS_7KPxjSj6lbuasiRiDe_hQVnDzGI51X4gWBxwk8JTh7xWSaMS4vcobYPBP5ngH_saF5IdxAy6JPc1OINzT7aWmE2nAoulKSXF-jcHT1V2mvhPNtvEpMFlpyJxFu06PCDeLTZwaKyoS5YcCmry-iymM4ugTW4HLTx\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>Review the policy attached and enter a role name. Once done, click on <strong>create role.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/VYOkh_DW4LZZCu1F54UNBrm-qfUHu8Cwh0tCIXtshKItyr4czn5LRUE026cjQwjCG19eu-lnzBlybYX9ZMLMCcP0lvI4gPltGYaTCfFCxer3cx5GnV_fiRAHaEAGoXvJO1SYyaf2R7mbkIRvhdbQKPFUA1-ockp2C71mSP9IxvvW5p6Ui_BbmWmG\" alt=\"\"\/><\/figure>\n\n\n\n<p>The role you just created will be visible under the roles section on the console.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/0eNN-SS_Ibro8hBkBo_9RrTOwu215ngHQnfEd7lF65CClF1wL7PWV1grezf3YJGj643tqhyzA13zGYYo-7uI__wtL6Ex9sK19_r95wKKYaFa7j_1kH0rE2KmxLMUOA90Xytexi17BkbXFc8xwuhGdaKLDXYvPfbBRQTA9XB1jyadKHJxgDYTsV6p\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<ol start=\"9\"><li>Now, open the Amazon SES Console as shown in the below screenshot:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/VNi2vx56ZF9OxbzCAsgPowhFeNUa12-ej5bia3_7SWfb7ALS9i4UsUz8cl-hGH92LC8cTBGFo0HR_fVofd3yP5Fy1YPyQ7DwnQcHZ5okwxxVAJYzy688aVBq1W6ijfSiJxJxQ919pnMFvDX4ABQmUIovrL0ASWtPaJX1o3BIoJ9pq9gHE3tt2HIX\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>Click on the \u2018Email Addresses\u2019 under \u2018Identity Management\u2019 on the left side.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/baACR7aHmmGeLkusQgur4_pjNruTOGm_8_IomNB1jhhjWDHOWfdBEAnMjNslE8Gvemxizpd7FTBuB3IN-mf3ir4xc5mEnkxJKMN2XCALIRiFdBXaTKfmwLqWRYnvrXSKcyvS_sqStwh--Bm4NkPomseT-1XG_EkD3uIUgYNw23zMwoFA74sbzt5K\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Click on <strong>Verify a New Email Address<\/strong> and a modal will appear. Enter the email on which you want to receive emails. Remember that both the \u2018sender\u2019s and receivers\u2019 email addresses will have to be verified to send and receive emails.&nbsp;<\/p>\n\n\n\n<p>For this exercise, we will verify one email address and use the same email address as sender and receiver.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/gMIwL6-pnoztaWovg-tQEilAKyB81k7tGyevtliSXHS5aXlIOEk7g7I3_B1eERML3cE9wrtARBMaGCXWC0fb3VB7Zm-0q1lVgGfu9Hu7_VUW2hknknUB8TAATzUwFRJzUhz7nlRoVEJwLfgrbm2V7atlQe80DZ0aNxZB1eG6lRJzbhuue9Vi2qyb\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Click on <strong>Verify This Email Address.<\/strong> You will then receive a verification email on the email address as shown in the below screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/_MfeB78fHdzR-0pZF5rDIA2T1902UIHmmT2Ckypdhaakc85OqdN4MF0bAY7ao3YS2Hiw-tkErHXSCITSl-8gjQ10Kf_57hhPqScqFg4WTFfnK3o2-zwh56s4Ye1oxY5jF4rfzorsqNeOc8UZ4g--9OFcCGLjdXtBrqjBz65jVOduDf-6hzE9Gqc5\" alt=\"\"\/><\/figure>\n\n\n\n<p>Upon clicking the link in the email received, you will get the message shown in the below screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/daSv8ZkV7B8TGYpwd8oquQ4yl6Ff4TVGGVb92aEeXQiBTu8APbFA6PI4P-7DxqycheLHKHNdz-n0uY4In-Gars1He2lJxCRhXfG4LeouB1OTVQq4ZMoYzGJr0sVAaJgZljNBDB9kH-NYvnoAJzhd5JZAB6JBTFgcpi_sKefEMSs0egZeo-ODRzht\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">On successful, your email address will be verified and will appear on the dashboard with the status verified as shown in the below screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/baACR7aHmmGeLkusQgur4_pjNruTOGm_8_IomNB1jhhjWDHOWfdBEAnMjNslE8Gvemxizpd7FTBuB3IN-mf3ir4xc5mEnkxJKMN2XCALIRiFdBXaTKfmwLqWRYnvrXSKcyvS_sqStwh--Bm4NkPomseT-1XG_EkD3uIUgYNw23zMwoFA74sbzt5K\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<ol start=\"10\"><li>Now, open the AWS Lambda console. Select<strong> Functions<\/strong> mentioned in the left navigation pane as shown in the below screenshot. Click on <strong>Create Function<\/strong>.&nbsp;<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/Jq9-PqV5V24oSqcG73A_6hOMY_RA7COGv5EgQO0dfo53RnR4X9ZyOXTD_uZql0M3-ox7AIk3zcnvt655U1rSe2gNw9yjqYpy7vitXp4vnp9ql8M08kxAnY0Yl8mOouffTjI7fFoVz9bBycCVgOK3RX8mPY3s0T8wNVaVmEGKrO9eg4yPrg-t2Oin\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Select <strong>Author from scratch<\/strong>, enter the function name, select the runtime as <strong>Python 3.7 <\/strong>as shown in the following screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/wuxxT9u33s_vh5YOWfdN6SXMJXsK_uJHRl02xwfN-ABoi4nsh2SWY3vlLQHpzvUjghHsZojzNsdsxfD79Xgd8lJm5lJ7VWXkbrOcEizJh-m2QK3JumbcZF1Epa4g4Rw77y8QNpDxr2gJWLfPz2QUor4Zl2ABuU8n2IFLiw9-pmYlNCXgvfznhe6P\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Under the Execution role, select <strong>Use an existing role<\/strong> and select the role you created above and click on <strong>Create Function.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/lBmT1T5cqfusEiYQJiWGP7QxmDPMSG41csj9cfawOViGw3S8a5pt3Mh7ehUEkEmYT2PmFsdT0BmpvAzzdknMqrKlY0noTnLOtiPfWnnQ_LG2qkmOTp5_tm0b_q8ryNUVKFtedMeLwRiaruLM8gjxq5RRkDWJdUwiCTI0TtejWaH-qjnMKJUKEpLT\" alt=\"\"\/><\/figure>\n\n\n\n<p>Upon clicking on<strong> Create function<\/strong>, you will be navigated to the function console as shown in the below screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/sNcJkunJ_KVAi_Uy0b-Fui-x6QwDzrmo1qz_lDALUPePF9Z8tIT2enDJLywnuUn5XEZM60KUX0AXYLNy4TEyU-kRMV5lSOP2g2YxH0AGKsHwqCA-hbYuLQaQMp1QcMB8UTU1-WspHcjODdQ_w6lCjvySzVvz0XHhhuVdSv4AsfOd7H-KGy50oNJt\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>Now scroll down and under the function code in the editor pane, write the following code:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport boto3\nfrom botocore.exceptions import ClientError\n \ndef lambda_handler(event, context):\n    sender_email_address = 'sender's email address'\n \n    receiver_email_address = 'receiver's email address'\n \n    aws_region_name = &quot;aws region&quot;\n \n    email_subject = &quot;Subject name&quot;\n \n    html_body = (&quot;&lt;html&gt;&quot;\n        &quot;&lt;body&gt;&quot;\n        &quot;&lt;p&gt;Dear Admin,&lt;\/p&gt;&quot;\n        &quot;&lt;br&gt;&quot;\n        &quot;&lt;p&gt;New Object Added in the bucket.&lt;\/p&gt;&quot;\n        &quot;&lt;\/body&gt;&quot;\n        &quot;&lt;\/html&gt;&quot;)\n \n    charset = &quot;UTF-8&quot;\n \n    ses_resource = boto3.client('ses', region_name = aws_region_name)\n \n    try:\n        response = ses_resource.send_email(\n                Destination = {\n                    'ToAddresses': &#91;\n                        receiver_email_address,\n                    ],\n                },\n                Message = {\n                    'Body': {\n                        'Html': {\n                            'Charset': charset,\n                            'Data': html_body,\n                        },\n                    },\n                    'Subject': {\n                        'Charset': charset,\n                        'Data': email_subject,\n                    },\n                },\n                Source = sender_email_address,\n            )\n \n    except ClientError as e:\n        print(&quot;Email Delivery Failed! &quot;, e.response&#91;'Error']&#91;'Message'])\n    else:\n        print(&quot;Email successfully sent to &quot; + receiver_email_address + &quot;!&quot;)\n<\/pre><\/div>\n\n\n<p>In the above sample code:<\/p>\n\n\n\n<ul><li>Change the \u2018sender\u2019s email address\u2019 to the email address using which you want to send the email.<\/li><li>Change the \u2018receiver\u2019s email address\u2019 to the email address on which you want to receive the email.<\/li><li>Ensure that both the email addresses (sender and receiver) are verified on Amazon SES.<\/li><li>Change the \u2018aws region\u2019 based on the region you are operating in.<\/li><li>You can edit the \u2018Subject Name\u2019 and the \u2018HTML Body\u2019 as you want.<\/li><\/ul>\n\n\n\n<p class=\"has-text-align-justify\">Since, we are using only a single email address in this blog, the senders and receivers email addresses are the same.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/grRxvbuis0sjiud-MMlSUQCTK2LKkUYM-6i9j81Z6eTZ07cp-nVLis0TUiWRnEok4cZufwN7e89Kh2jUoVYyJdC69A-BTDFBqeIb2hSmTzMX-tnEcxxXO9mgoXZVmZS5UGH9iK8lU7AMVI4rXwA4f2FJa-X9cd3I8NDohCw_PVcPPPJUVgWaScyr\" alt=\"\"\/><\/figure>\n\n\n\n<p>Click on the deploy.<\/p>\n\n\n\n<ol start=\"11\"><li>Now scroll back up and click on <strong>Add Trigger<\/strong><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/BqSCIQkzvIkO0dbfB1eHLEEqITCWqXnw19rWmI7yTEDIgDew0Hdc8ReYuoA5wlfMuFaRyT5WbyirbdbYt4S5TMkymj5jn6bTm9uvUM69_1-7c-4gc1h4jKnHQTD0oX1UW5Rv7_n9hE1WMjO3VXD_OBWrBJHGKKVpMSI_6CB0Iylb2TaWPFw4flGV\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Select \u2018S3\u2019 as the trigger, the bucket name which we have created at the beginning of the exercise, select the \u2018Event type\u2019 to \u2018PUT\u2019 and finally add prefix &amp; suffix (if any) for your bucket.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/m3nBULL4YNKzw2YqF2roTrshilU3mNSM4H02n64dA3FpPNNjiNzRw5h9fZNjuiE-THiWQM-LVa65kw0_nV3D2-dGs7dlYsstmCgUypJ_i_wGrgY1jVLrDt47XExEBIFE5gc6YbrDiwandUEUQeWIfFj2dvCAGswggqMSaqV43pemiS05W2mr5yPl\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>Scroll down and click on Add<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/kvCBf4xdRxGroGjG-4dC-67GkkE5bsNVyQOdfrzxAOWh5qktJGxcJ2Jgdxls8ylQtK5oXNDptaaxY_76-m2BsG0vzMlTNKdrWKgKsQZyQUUSB_n2Pr25J_Vs1KYCsUr-kQAFW9yWVW0SiaqRK1RZ0mC42mQ8GZbC58XKEBQSxa89HIKaP1fnEHrX\" alt=\"\"\/><\/figure>\n\n\n\n<p>In the following screenshot, you can see the S3 trigger added on the lambda console.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/b9wQjJa8L_UDIKignNwzkY_Mr8xXrEswtQyWNJXawMoYMb01c0URK1lGmRgT5O0S6MZVZjhe_kxoQ25uYDtLDHYcgmk7VviUkvM6m5cZ9em3_AKsJ2yptTqDHLugob147R3eJzZmyA9q_ZKReygGKuGplefjfEyEgRE19pooj1H74lLJHVteRmap\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>click on <strong>deploy. <\/strong>Lambda function is ready to use now!<\/p>\n\n\n\n<ol start=\"12\"><li>Now, go back to the Amazon S3 console and get into the bucket which we have created in the beginning of the exercise<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/MmoA1pPHbGwsNjYVpxChU0G1q7a76jVEGG5Fk2Q25N8UrohAbaeNc2OVYVlwO7WUjGEXILYxySw9O7U5dCWz-vO_gea33jUm_RcPdYWXD-WrgpfzLKjYh9S3dTQJMarTOXTIAhQYAIHh3zDvAEM8srRwrI2Gm1AXtKlkONgGvy9S_wBMYCHXtIaH\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<p>Click on <strong>Upload<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/WghsYiTT4ab6DbHhRgMJXVZigumWRVGNFd78ARs8oPq6QOkXpPFGraR84osm-0PXGXXPgfURbYhIKiT4ko-Bhkm4CwuuDjLC80spgyqELe8nj_Qf-njnpkLTqlf6-R3xNw45wYZONOAJ7dd_Vlx8VYHJD-lcH0f_kOYm_rUfym5cEzyyBfhWDCfM\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Click on <strong>Add Files<\/strong>, attach the files you want to add in the bucket and click on <strong>upload<\/strong>. We will be uploading an image file shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/f6wqm2TzOehwgl3ij6ob8e-tXIVQ8mQHl5YDNX6amvCQoJ6msfq-i8JL7-4AJZvHjjRWlakVWDvG4o4Po0hF-QP-1hgHc8ajNfvET2PQwM4aJpfXe3YEKBC2UEKVMbpYZB-C4M_QfgSBW_CjWg-1rrYZFq9Lss1BKQGRbRJFmbTg6XVK81WI67xP\" alt=\"How to send S3 event notification email using Lambda and SES?\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/MXws8zAn33KS5n9y5JhR9KP3NFrH1y-a6Ws3ZOQ3QQmT_zrFCM5gEO7t53Sp4AhcqstOnAWxGk-1DzK6oHPv0do3A1d8xetu4VpsLaSmM2XIztUX2d2Edg_seinVvnn8DVr6hpa1v1bwX8jJtKg5SIYnO5LslzVd6PksxJDtjLCjI68QHgpP9Atk\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">As soon as the image object is added to the bucket, it will trigger the Lambda function and the admin will receive an email on its email address as shown in the below screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/dwX4E0pLDBMwq4L19dOwSKhxB1CJNjBuDcXKcI0wre4CAGjCXVFSjaRwRYEv-s3rycntTgwFBcaQMZi3DFSVjoTO5Ht5bb7sLWaPr7L-3p7M_vJpEP-Lnd-RDI5JUsuKL8iVgHwU96D1pmUGWOKbwSjGKD3JvdoN3Rj6d3nqLgxiY0Mf3mz-fNJV\" alt=\"\"\/><\/figure>\n\n\n\n<h2><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"has-text-align-justify\">In this blog, you have seen how easily we can configure Amazon Simple Email Service and we have used it to send notifications while any new objects get added to the S3 bucket. We have used the Lambda function to write code and configured triggers.&nbsp; We will discuss more about serverless, Lambda, SES, and many more topics in our upcoming blog. Stay tuned to keep getting all updates about our upcoming new blogs on AWS and relevant technologies.&nbsp;<\/p>\n\n\n\n<p>For any further queries, feel free to post your comments, we are happy to help!<\/p>\n\n\n\n<p>Meanwhile \u2026<\/p>\n\n\n\n<p><strong>Keep Exploring -&gt; Keep Learning -&gt; Keep Mastering<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">This blog is part of our effort towards building a knowledgeable and kick-ass tech community. At Workfall, we strive to provide the best tech and pay opportunities to AWS-certified talents. If you\u2019re looking to work with global clients, build kick-ass products while making big bucks doing so, give it a shot at<a href=\"https:\/\/www.workfall.com\/partner\/\"> workfall.com\/partner<\/a> today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">10<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span> Email notifications are an important part of any modern application. In this blog, we will discuss how to send Email notifications using the Amazon SES service and AWS Lambda and will demonstrate how to send an acknowledgment email to a user using AWS Lambda and Amazon SES upon adding new objects in an S3 bucket. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":390,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[2],"tags":[3,57,42,117,6],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to send S3 event notification email using Lambda and SES? - The Workfall Blog<\/title>\n<meta name=\"description\" content=\"Amazon SES is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to send S3 event notification email using Lambda and SES? - The Workfall Blog\" \/>\n<meta property=\"og:description\" content=\"Amazon SES is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/\" \/>\n<meta property=\"og:site_name\" content=\"The Workfall Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/workfall\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-03T11:01:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-21T10:12:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@workfall\" \/>\n<meta name=\"twitter:site\" content=\"@workfall\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Workfall\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\",\"name\":\"Workfall - Hire #Kickass Coders On Demand\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/\",\"sameAs\":[\"https:\/\/www.instagram.com\/workfall\/\",\"https:\/\/www.linkedin.com\/company\/workfall\/\",\"https:\/\/facebook.com\/workfall\",\"https:\/\/twitter.com\/workfall\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400\",\"contentUrl\":\"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400\",\"width\":400,\"height\":400,\"caption\":\"Workfall - Hire #Kickass Coders On Demand\"},\"image\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#website\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/\",\"name\":\"The Workfall Blog\",\"description\":\"#Tech #Remote #Jobs\",\"publisher\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learning.workfall.com\/learning\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#primaryimage\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png\",\"contentUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png\",\"width\":1200,\"height\":628,\"caption\":\"How to send S3 event notification email using Lambda and SES\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#webpage\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/\",\"name\":\"How to send S3 event notification email using Lambda and SES? - The Workfall Blog\",\"isPartOf\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#primaryimage\"},\"datePublished\":\"2021-11-03T11:01:17+00:00\",\"dateModified\":\"2025-08-21T10:12:17+00:00\",\"description\":\"Amazon SES is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application\",\"breadcrumb\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/learning.workfall.com\/learning\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to send S3 event notification email using Lambda and SES?\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#webpage\"},\"author\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a\"},\"headline\":\"How to send S3 event notification email using Lambda and SES?\",\"datePublished\":\"2021-11-03T11:01:17+00:00\",\"dateModified\":\"2025-08-21T10:12:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#webpage\"},\"wordCount\":2077,\"publisher\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png\",\"keywords\":[\"AWS\",\"lambda\",\"serverless\",\"ses\",\"workfall\"],\"articleSection\":[\"AWS Cloud Computing\"],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a\",\"name\":\"Workfall\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png\",\"contentUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png\",\"caption\":\"Workfall\"},\"sameAs\":[\"https:\/\/www.workfall.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to send S3 event notification email using Lambda and SES? - The Workfall Blog","description":"Amazon SES is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/","og_locale":"en_US","og_type":"article","og_title":"How to send S3 event notification email using Lambda and SES? - The Workfall Blog","og_description":"Amazon SES is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application","og_url":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/","og_site_name":"The Workfall Blog","article_publisher":"https:\/\/facebook.com\/workfall","article_published_time":"2021-11-03T11:01:17+00:00","article_modified_time":"2025-08-21T10:12:17+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_creator":"@workfall","twitter_site":"@workfall","twitter_misc":{"Written by":"Workfall","Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization","name":"Workfall - Hire #Kickass Coders On Demand","url":"https:\/\/learning.workfall.com\/learning\/blog\/","sameAs":["https:\/\/www.instagram.com\/workfall\/","https:\/\/www.linkedin.com\/company\/workfall\/","https:\/\/facebook.com\/workfall","https:\/\/twitter.com\/workfall"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400","contentUrl":"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400","width":400,"height":400,"caption":"Workfall - Hire #Kickass Coders On Demand"},"image":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#website","url":"https:\/\/learning.workfall.com\/learning\/blog\/","name":"The Workfall Blog","description":"#Tech #Remote #Jobs","publisher":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learning.workfall.com\/learning\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#primaryimage","url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png","contentUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png","width":1200,"height":628,"caption":"How to send S3 event notification email using Lambda and SES"},{"@type":"WebPage","@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#webpage","url":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/","name":"How to send S3 event notification email using Lambda and SES? - The Workfall Blog","isPartOf":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#primaryimage"},"datePublished":"2021-11-03T11:01:17+00:00","dateModified":"2025-08-21T10:12:17+00:00","description":"Amazon SES is a cost-effective, flexible, and scalable email service that enables developers to send mail from within any application","breadcrumb":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/learning.workfall.com\/learning\/blog\/"},{"@type":"ListItem","position":2,"name":"How to send S3 event notification email using Lambda and SES?"}]},{"@type":"Article","@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#article","isPartOf":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#webpage"},"author":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a"},"headline":"How to send S3 event notification email using Lambda and SES?","datePublished":"2021-11-03T11:01:17+00:00","dateModified":"2025-08-21T10:12:17+00:00","mainEntityOfPage":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#webpage"},"wordCount":2077,"publisher":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization"},"image":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/send-s3-event-notification-email-using-lambda-and-ses\/#primaryimage"},"thumbnailUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png","keywords":["AWS","lambda","serverless","ses","workfall"],"articleSection":["AWS Cloud Computing"],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a","name":"Workfall","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/image\/","url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png","contentUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png","caption":"Workfall"},"sameAs":["https:\/\/www.workfall.com"]}]}},"jetpack_featured_media_url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/SESandLambda.png","jetpack-related-posts":[{"id":461,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-trigger-lambda-function-using-amazon-cloudwatch-events-and-configure-cloudwatch-alarm-to-get-email-notifications-using-amazon-snspart-2\/","url_meta":{"origin":389,"position":0},"title":"How to trigger Lambda function using Amazon CloudWatch events and configure CloudWatch alarm to get email notifications using Amazon SNS(Part 2)?","date":"November 9, 2021","format":false,"excerpt":"Modern applications such as those running on microservices architectures generate large volumes of data in the form of metrics, logs, and events. Amazon CloudWatch enables you to collect, access, and correlate this data on a single platform from across all your AWS resources, applications, and services that run on AWS.\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"How to trigger Lambda Function using Amazon CloudWatch Events?","src":"https:\/\/i0.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/cloudwatch2.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":416,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-do-event-driven-programming-using-aws-lambda-with-amazon-kinesis-streams\/","url_meta":{"origin":389,"position":1},"title":"How to do event-driven programming using AWS Lambda with Amazon Kinesis Streams?","date":"November 3, 2021","format":false,"excerpt":"Amazon Kinesis is an AWS-managed service that processes streaming data at a massive scale. Using Amazon Kinesis, data could be easily sent to various sources like S3, DynamoDB, Redshift, and Lambda. Kinesis is used to process hundreds of terabytes of data per hour. AWS LAMBDA works as an event-driven computing\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"Amazon Kinesis Streams","src":"https:\/\/i2.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/Kinesis.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":504,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-use-aws-textract-to-extract-data-from-any-image-pdf\/","url_meta":{"origin":389,"position":2},"title":"How to use Amazon Textract to extract data from any Image & PDF?","date":"November 10, 2021","format":false,"excerpt":"Amazon Textract is a highly scalable machine learning service that collects printed text, handwriting, and other information from scanned documents automatically.\u00a0\u00a0\u00a0 Using Amazon Textract, you can easily extract text and data from images and any scanned documents that go beyond simple optical character recognition (OCR) to extract data from tables\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"How to use AWS Textract to extract data from any Image & PDF","src":"https:\/\/i0.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/Textract.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":310,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-can-we-use-amazon-comprehend-with-aws-lambda-and-amazon-lex-for-sentiment-analysispart-2\/","url_meta":{"origin":389,"position":3},"title":"How can we use Amazon Comprehend with AWS Lambda and Amazon Lex for Sentiment Analysis?","date":"November 1, 2021","format":false,"excerpt":"In our previous blog, How can we use Amazon Comprehend with AWS Lambda and Amazon Lex for Sentiment Analysis(Part 1)? we have discussed NLP, Amazon Comprehend as one of the best NLP services, its features, benefits, use cases, etc. In this blog, we will demonstrate how to configure Amazon Comprehend\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"How to use AWS Comprehend for Sentiment Analysis","src":"https:\/\/i2.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/comprehend.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":884,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-create-and-delete-email-templates-on-amazon-ses-using-node-js-and-postman-api\/","url_meta":{"origin":389,"position":4},"title":"How to create and delete Email Templates on Amazon SES using Node.js and Postman API?","date":"February 28, 2022","format":false,"excerpt":"If you are developing an application that needs to send bulk emails to larger communities for trigger-based messages such as email verification or password resets, announcements like festival discounts, newsletters, or general notifications in a cost-effective, flexible, and scalable manner, then Amazon SES is the answer. Amazon SES can be\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"Send and Delete Emails Templates with Amazon SES","src":"https:\/\/i0.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/02\/Cover-Images_Part2-9.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":520,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-build-a-serverless-workflow-with-aws-step-functions-part-1\/","url_meta":{"origin":389,"position":5},"title":"How to build a Serverless Workflow with AWS Step Functions (Part 1)?","date":"November 10, 2021","format":false,"excerpt":"AWS Step Functions is a serverless orchestration solution that enables you to effortlessly coordinate several Lambda functions into customizable workflows that are simple to debug and modify. To see the full implementation of How to Build a Serverless Workflow with AWS Step Functions, refer to part 2 of the blog\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"AWS Step Functions - Workfall","src":"https:\/\/i2.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/11\/StepFunction01.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/389"}],"collection":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/comments?post=389"}],"version-history":[{"count":7,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/389\/revisions"}],"predecessor-version":[{"id":2204,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/389\/revisions\/2204"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/media\/390"}],"wp:attachment":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/media?parent=389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/categories?post=389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/tags?post=389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}