SlideShare a Scribd company logo
How to use AWS SES with Lambda
in Ruby on Rails application
Michał Łęcicki
Background
• Ruby on Rails application with legacy code
• Many dependent services: Postfix, Sidekiq, Sphinx, Mysql
• One dedicated server
• No documentation
Emails - from user perspective
• Sending & receiving emails in application
• Approximately 20 000 email daily
• Different types of emails:
• communications
• data imports
Emails - from system perspective
Old solution flaws
• No cloud friendly
• Outdated libraries, difficult configuration
• Problems with deployments
• No monitoring & hard debugging
• No backup
Alternatives
• Fetch emails directly with IMAP protocol
• Third-party tools
• Rails Action Mailbox
• AWS SES (Simple Email Service)
AWS Simple Email Service
• Simple configuration
• Compatible with other AWS services
• Cost effective
• Easy to check -> prototype created in 3 days
New solution
New approach
Receiver
• Email receiving (SES)
• Storing email messages (S3)
• Notifying about new emails (Lambda)
Feeder
• Check for new emails
(Sidekiq)
• Processing new emails
(Rails)
New solution
Receiver Feeder
AWS Lambda
• Invoked every time new item is added to S3 bucket
• Create new entry in email_requests table
t.string "email_type"
t.string "s3_file_link", null: false
t.string "lambda_request_id", null: false
t.datetime “started_processing_at"
t.datetime "finished_processing_at"
AWS Lambda gotchas
• Local setup & development
• Logs are quite troublesome
• Be aware of duplicates!
• Unintuitive setup of versions & aliases
• Hard to save in terraform
New solution
• Cloudy
• Very extendable
• Complex setup, but within one provider
• Saving & storing emails is independent from processing them
Thank you for your attention!

More Related Content

What's hot (20)

PDF
Serverless data processing with Data Pipeline
Radek Miazio
 
PPTX
Greetings from AWS User Group Taiwan
Cliff Chao-kuan Lu
 
PPTX
Meetup #3: Migrating an Oracle Application from on-premise to AWS
AWS Vietnam Community
 
PDF
Intro to Serverless
Cliff Chao-kuan Lu
 
PPTX
Cloudsolutionday 2016: Docker & FAAS at getvero.com
AWS Vietnam Community
 
PPTX
Wikipedia Cloud Search Webinar
Search Technologies
 
PDF
Microservices with AWS Lambda and the Serverless Framework
Rowell Belen
 
PPTX
104 meets cloud
Cliff Chao-kuan Lu
 
PDF
Kapil Thangavelu - Cloud Custodian
ServerlessConf
 
PPTX
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
Frank van der Linden
 
PDF
Serverless Microservices w/ AWS Lambda and node.js
Frank Valcarcel
 
PPTX
MongoDB World 2018: Replatforming: Switching to MongoDB for Flexibility, Scal...
MongoDB
 
PPSX
Signalr with ASP.Net part2
Esraa Ammar
 
PDF
Serverless Architectures on AWS Lambda
Serhat Can
 
PDF
Connecting Akka with Oracle Event Hub Cloud Service
Dalibor Blazevic
 
PPTX
Aws serverless architecture
genesesoftware
 
PDF
Nested Beanstalk Deployment - Brett Sutter, Minneapolis
AWS Chicago
 
PDF
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
Frank van der Linden
 
PDF
Reative UI
Mike Bluestein
 
PPTX
Windows Azure
NascentDigital
 
Serverless data processing with Data Pipeline
Radek Miazio
 
Greetings from AWS User Group Taiwan
Cliff Chao-kuan Lu
 
Meetup #3: Migrating an Oracle Application from on-premise to AWS
AWS Vietnam Community
 
Intro to Serverless
Cliff Chao-kuan Lu
 
Cloudsolutionday 2016: Docker & FAAS at getvero.com
AWS Vietnam Community
 
Wikipedia Cloud Search Webinar
Search Technologies
 
Microservices with AWS Lambda and the Serverless Framework
Rowell Belen
 
104 meets cloud
Cliff Chao-kuan Lu
 
Kapil Thangavelu - Cloud Custodian
ServerlessConf
 
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
Frank van der Linden
 
Serverless Microservices w/ AWS Lambda and node.js
Frank Valcarcel
 
MongoDB World 2018: Replatforming: Switching to MongoDB for Flexibility, Scal...
MongoDB
 
Signalr with ASP.Net part2
Esraa Ammar
 
Serverless Architectures on AWS Lambda
Serhat Can
 
Connecting Akka with Oracle Event Hub Cloud Service
Dalibor Blazevic
 
Aws serverless architecture
genesesoftware
 
Nested Beanstalk Deployment - Brett Sutter, Minneapolis
AWS Chicago
 
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
Frank van der Linden
 
Reative UI
Mike Bluestein
 
Windows Azure
NascentDigital
 

Similar to How to use AWS SES with Lambda 
in Ruby on Rails application - Michał Łęcicki (8)

PPTX
Send and receive email for serverless developers
Jeshan Babooa
 
PPTX
Amazon Simple Email Service
chrisawheeler
 
PPTX
Building self service framework
Rovshan Musayev
 
PPTX
Amazon_SES.pptx
Ankit Meena
 
PPT
2011210seslaunchwebinar 110220233455 Phpapp02
chrisawheeler
 
PDF
Lessons Learned from Building a Serverless Notifications System by Srushith R...
ScyllaDB
 
PDF
AWS Application Services Lambda, SES, SNS, SQS, SWF
Shubhamfozdar5
 
PDF
Rails 3 Beginner to Builder 2011 Week 6
Richard Schneeman
 
Send and receive email for serverless developers
Jeshan Babooa
 
Amazon Simple Email Service
chrisawheeler
 
Building self service framework
Rovshan Musayev
 
Amazon_SES.pptx
Ankit Meena
 
2011210seslaunchwebinar 110220233455 Phpapp02
chrisawheeler
 
Lessons Learned from Building a Serverless Notifications System by Srushith R...
ScyllaDB
 
AWS Application Services Lambda, SES, SNS, SQS, SWF
Shubhamfozdar5
 
Rails 3 Beginner to Builder 2011 Week 6
Richard Schneeman
 
Ad

More from Visuality (20)

PPTX
3 issues that made 30 test workers take 40 minutes
Visuality
 
PPTX
Czego nie robić przy pisaniu testów
Visuality
 
PDF
Introduction to Domain-Driven Design in Ruby on Rails
Visuality
 
PDF
Active Record .includes - do you use it consciously?
Visuality
 
PDF
Introduction to Event Storming
Visuality
 
PDF
Jak programowanie może pomóc na co dzień?
Visuality
 
PDF
SVG Overview - How To Draw, Use and Animate
Visuality
 
PDF
How To Migrate a Rails App From a Dedicated Server Into Cloud Environment? - ...
Visuality
 
PPTX
What is NOT machine learning - Burak Aybar
Visuality
 
PPTX
Do you really need to reload?
Visuality
 
PDF
How to check valid email? Find using regex(p?)
Visuality
 
PPTX
Fantastic stresses and where to find them
Visuality
 
PDF
Fuzzy search in Ruby
Visuality
 
PDF
Rfc process in visuality
Visuality
 
PDF
GraphQL in Ruby on Rails - basics
Visuality
 
PPTX
Consumer Driven Contracts
Visuality
 
PDF
How do we use CircleCi in Laterallink?
Visuality
 
PDF
React Native - Short introduction
Visuality
 
PDF
Risk in project management
Visuality
 
PDF
Ruby formatters
Visuality
 
3 issues that made 30 test workers take 40 minutes
Visuality
 
Czego nie robić przy pisaniu testów
Visuality
 
Introduction to Domain-Driven Design in Ruby on Rails
Visuality
 
Active Record .includes - do you use it consciously?
Visuality
 
Introduction to Event Storming
Visuality
 
Jak programowanie może pomóc na co dzień?
Visuality
 
SVG Overview - How To Draw, Use and Animate
Visuality
 
How To Migrate a Rails App From a Dedicated Server Into Cloud Environment? - ...
Visuality
 
What is NOT machine learning - Burak Aybar
Visuality
 
Do you really need to reload?
Visuality
 
How to check valid email? Find using regex(p?)
Visuality
 
Fantastic stresses and where to find them
Visuality
 
Fuzzy search in Ruby
Visuality
 
Rfc process in visuality
Visuality
 
GraphQL in Ruby on Rails - basics
Visuality
 
Consumer Driven Contracts
Visuality
 
How do we use CircleCi in Laterallink?
Visuality
 
React Native - Short introduction
Visuality
 
Risk in project management
Visuality
 
Ruby formatters
Visuality
 
Ad

Recently uploaded (20)

PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 

How to use AWS SES with Lambda 
in Ruby on Rails application - Michał Łęcicki

  • 1. How to use AWS SES with Lambda in Ruby on Rails application Michał Łęcicki
  • 2. Background • Ruby on Rails application with legacy code • Many dependent services: Postfix, Sidekiq, Sphinx, Mysql • One dedicated server • No documentation
  • 3. Emails - from user perspective • Sending & receiving emails in application • Approximately 20 000 email daily • Different types of emails: • communications • data imports
  • 4. Emails - from system perspective
  • 5. Old solution flaws • No cloud friendly • Outdated libraries, difficult configuration • Problems with deployments • No monitoring & hard debugging • No backup
  • 6. Alternatives • Fetch emails directly with IMAP protocol • Third-party tools • Rails Action Mailbox • AWS SES (Simple Email Service)
  • 7. AWS Simple Email Service • Simple configuration • Compatible with other AWS services • Cost effective • Easy to check -> prototype created in 3 days
  • 9. New approach Receiver • Email receiving (SES) • Storing email messages (S3) • Notifying about new emails (Lambda) Feeder • Check for new emails (Sidekiq) • Processing new emails (Rails)
  • 11. AWS Lambda • Invoked every time new item is added to S3 bucket • Create new entry in email_requests table t.string "email_type" t.string "s3_file_link", null: false t.string "lambda_request_id", null: false t.datetime “started_processing_at" t.datetime "finished_processing_at"
  • 12. AWS Lambda gotchas • Local setup & development • Logs are quite troublesome • Be aware of duplicates! • Unintuitive setup of versions & aliases • Hard to save in terraform
  • 13. New solution • Cloudy • Very extendable • Complex setup, but within one provider • Saving & storing emails is independent from processing them
  • 14. Thank you for your attention!