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

PPTX
DevOps with AWS in 2016
PPTX
AWS VPC Fundamental
PDF
Asp.Net 3.5 Part 2
PDF
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
PPTX
Standard libraries with_xamarin
PPTX
AWS - Beanstalk Fundamentals
PPTX
Amazon Virtual Private Cloud - VPC 2
PPTX
Serverless Function With Python and AWS Lambda
DevOps with AWS in 2016
AWS VPC Fundamental
Asp.Net 3.5 Part 2
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Standard libraries with_xamarin
AWS - Beanstalk Fundamentals
Amazon Virtual Private Cloud - VPC 2
Serverless Function With Python and AWS Lambda

What's hot (20)

PDF
Serverless data processing with Data Pipeline
PPTX
Greetings from AWS User Group Taiwan
PPTX
Meetup #3: Migrating an Oracle Application from on-premise to AWS
PDF
Intro to Serverless
PPTX
Cloudsolutionday 2016: Docker & FAAS at getvero.com
PPTX
Wikipedia Cloud Search Webinar
PDF
Microservices with AWS Lambda and the Serverless Framework
PPTX
104 meets cloud
PDF
Kapil Thangavelu - Cloud Custodian
PPTX
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
PDF
Serverless Microservices w/ AWS Lambda and node.js
PPTX
MongoDB World 2018: Replatforming: Switching to MongoDB for Flexibility, Scal...
PPSX
Signalr with ASP.Net part2
PDF
Serverless Architectures on AWS Lambda
PDF
Connecting Akka with Oracle Event Hub Cloud Service
PPTX
Aws serverless architecture
PDF
Nested Beanstalk Deployment - Brett Sutter, Minneapolis
PDF
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
PDF
Reative UI
PPTX
Windows Azure
Serverless data processing with Data Pipeline
Greetings from AWS User Group Taiwan
Meetup #3: Migrating an Oracle Application from on-premise to AWS
Intro to Serverless
Cloudsolutionday 2016: Docker & FAAS at getvero.com
Wikipedia Cloud Search Webinar
Microservices with AWS Lambda and the Serverless Framework
104 meets cloud
Kapil Thangavelu - Cloud Custodian
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
Serverless Microservices w/ AWS Lambda and node.js
MongoDB World 2018: Replatforming: Switching to MongoDB for Flexibility, Scal...
Signalr with ASP.Net part2
Serverless Architectures on AWS Lambda
Connecting Akka with Oracle Event Hub Cloud Service
Aws serverless architecture
Nested Beanstalk Deployment - Brett Sutter, Minneapolis
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
Reative UI
Windows Azure
Ad

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

PPTX
An experiment with AWS Lambda
PDF
JustGiving – Serverless Data Pipelines, API, Messaging and Stream Processing
PDF
JustGiving | Serverless Data Pipelines, API, Messaging and Stream Processing
PDF
Getting started with AWS Lambda and the Serverless Cloud
PDF
Microservices Manchester: Serverless Architectures By Rafal Gancarz
PDF
Serverless Architectural Patterns and Best Practices | AWS
PDF
DevTalks Romania - Getting Started with AWS Lambda & the Serverless Cloud
PPTX
Azure Messaging Services 2
PDF
Introduction to AWS
PDF
AWS Lambda Function with Kotlin
PDF
AWS Lambda at JUST EAT
PDF
Serverless Node.js
PDF
GraphQL - A love story
PPTX
Serverless Reality
PDF
Exploring Serverless Architectures: AWS Lambda
PDF
Introduction to Amazon Directory Services, Amazon WorkSpaces, Amazon WorkMail...
PDF
AWS re:Invent 2014 | (ARC202) Real-World Real-Time Analytics
PPTX
LynfaCloud @aws
PDF
AWS Finland Meetup 2019 April
PDF
AWS Česko-Slovenský Webinár 03: Vývoj v AWS
An experiment with AWS Lambda
JustGiving – Serverless Data Pipelines, API, Messaging and Stream Processing
JustGiving | Serverless Data Pipelines, API, Messaging and Stream Processing
Getting started with AWS Lambda and the Serverless Cloud
Microservices Manchester: Serverless Architectures By Rafal Gancarz
Serverless Architectural Patterns and Best Practices | AWS
DevTalks Romania - Getting Started with AWS Lambda & the Serverless Cloud
Azure Messaging Services 2
Introduction to AWS
AWS Lambda Function with Kotlin
AWS Lambda at JUST EAT
Serverless Node.js
GraphQL - A love story
Serverless Reality
Exploring Serverless Architectures: AWS Lambda
Introduction to Amazon Directory Services, Amazon WorkSpaces, Amazon WorkMail...
AWS re:Invent 2014 | (ARC202) Real-World Real-Time Analytics
LynfaCloud @aws
AWS Finland Meetup 2019 April
AWS Česko-Slovenský Webinár 03: Vývoj v AWS
Ad

More from Visuality (20)

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

Recently uploaded (20)

PDF
medical staffing services at VALiNTRY
PDF
System and Network Administration Chapter 2
PDF
Digital Strategies for Manufacturing Companies
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
ai tools demonstartion for schools and inter college
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Introduction to Artificial Intelligence
PPTX
Transform Your Business with a Software ERP System
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
System and Network Administraation Chapter 3
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
medical staffing services at VALiNTRY
System and Network Administration Chapter 2
Digital Strategies for Manufacturing Companies
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
How to Migrate SBCGlobal Email to Yahoo Easily
Softaken Excel to vCard Converter Software.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Design an Analysis of Algorithms II-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
ai tools demonstartion for schools and inter college
Wondershare Filmora 15 Crack With Activation Key [2025
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Online Work Permit System for Fast Permit Processing
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Introduction to Artificial Intelligence
Transform Your Business with a Software ERP System
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
System and Network Administraation Chapter 3
How Creative Agencies Leverage Project Management Software.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx

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!