Live data from Hacker News

A serverless email server on AWS using S3 and SES

github.com

231–240 of 266 posts

Re: A serverless email server on AWS using S3 and SES

#231
post #131

Just a friendly reminder, since I've worked with SES in the past: Don't forget about bounces when using SES [0]. From [0]: > If your bounce rate is 5% or greater, we'll place your account under review. To sum it up, try to keep track of bounced e-mails by using the SES notifications [1]. [0] https://docs.aws.amazon.com/ses/latest/DeveloperGuide/e-faq.... [1] https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monit…

We accidentally had ses credentials set up on our QA server and quickly got banned for sending too many sdf@sdf.com emails. Took quite some time to get it unbanned. Since then we switched to Mailgun for email delivery but ses is still useful for processing incoming email via Lambda

We are careful to use throwaway email addresses like randomusername@mailinator.com on our dev and staging servers so they still get delivered, but we can just forget about them.

Really interested to learn about the SES simulator address though (posted as a reply on this thread) - don't know how we missed that, and it would have really helped with early testing when we were developing the email queueing system on our app.

Re: A serverless email server on AWS using S3 and SES

#233
post #164
post #54

Earlier quoted context omitted.

Indeed. I suspect the "serverless" word was created due to the emotional appeal to a specific (majority) group that is strongly opinionated against having servers at all. Reading from the README.md file: There are two major limitations with SES: For security reasons, AWS defaults to 200 emails sent per 24 hour period at a rate of 1 email/second. If you need to send more than that, you'll need to ask AWS to increase y…

I find these absurdly limited mail services strange. The one time I had to craft some "extra" email, was sending out surveys to an opt-in group for an EU project. There were some 10 000 recipients, and we had to send each a different email, in order to link responders with surveys (ie: a template email with description and an unique url of the form https://example.com/survey/123xyz ). Generating the emails in a naive…

The problem is spam. The big providers providing hosted emails do a lot of work to make sure the emails people send with them actually end up at the recipients inbox and not in spam quarantine - but that doesn't work if the provider is then used by spammers. So the limits are set to discourage spammers while making most use-cases for email still possible.

If one were to ask me what to do, I'd say emails should cost 0.1 cent each, to be paid to the recipient...

Re: A serverless email server on AWS using S3 and SES

#234

Earlier quoted context omitted.

Not a single post on Hacker News can use the term "serverless" without the exact same replies being posted every time. It's as if a certain portion of the HN crowd simply cannot fathom that a new term exists and is in use, and instead resort to the same, tired responses.

> Not a single post on Hacker News can use the term "serverless" wits nhout the exact same replies being posted every time. As a serverless skeptic/critic, the buzzword bingo aspect of serverless computing is far from being the problem, and it's a gross missrepresentation of the problems posed by serverless computing. The main problem with server applications such as AWS lambda, along with lack of control, is how utt…

I use to only program in assembly in the 80s because I “lacked control” higher level languages....

What perceived “control” are you missing?

Re: A serverless email server on AWS using S3 and SES

#235
post #55

Earlier quoted context omitted.

The emails sent by your $5 VPS wouldn't stand a chance of actually being delivered to people's Gmail or Outlook mailboxes. Whereas SES actually works. Also, it is incredibly easy to ask AWS support to increase the limit. A startup I worked with had only thousands of users; we told AWS about it and they gave us 5 million emails per 24 hours.

They stand the same chance, just setup dkim and spf as any of the hundred guides will tell you how to. Debate it on vendor lock in, reliability and out sourcing sysops, not on having to maybe manually set up some DNS records.

By all reports of people who have set up their own mail server lately, just having SPF and DKIM set up still won’t cut it for delivery to the major mail providers these days.

Re: A serverless email server on AWS using S3 and SES

#236

Earlier quoted context omitted.

Another drawback is that while yes, you can scale up fairly easily with terraform, your server can also fall over if you get a heavy burst of traffic, and you'll return errors until you're able to provision more machines. Depending on what you're doing, how fast you're growing, and how much tolerance your users have for downtime, that might be a pretty big deal.

Email itself has built-in resilience for such scenarios.

If it's a well behaving e-mail server it will keep trying to send the e-mail... A trick to stop spammers is to block all new connections for an hour. While spammers wont try again. Sadly some legitimate e-mail servers will not try again either :/ Also some e-mail servers wont try your backup e-mail server... Some servers will even give up if they haven't been able to establish a connection within a second. Some developers/admins give zero shit about edge cases and conditions outside their developer machine.

Re: A serverless email server on AWS using S3 and SES

#237
post #47

Earlier quoted context omitted.

Serverless is beautiful. You just need to try some basic serverless concepts. Like run a website on S3. But to your second point, I agree. the technical hurdle required to learn all the configuration and moving parts ... And then to know that this language is vendor specific... Makes it less palatable. That's why I expect the cloud vendors to normalize their offerings over time. I should be able to take a CloudFormat…

How is running a website on S3 different from uploading your website to a shared hosting provider 20 years ago? How is it “beautiful”?

That type of hosting didnt scale. You paid a flat fee for capped CPU and bandwidth.

Hosting today scales linearly in terms of resources and costs...

In addition you can hook up additional AWS services as your needs arise:

Add a CDN and deliver content to the edges, faster .

Add lambdas to handle regular updates to content, or basic authentication when users come in.

Monitor usage via Cloudwatch

Add in serverless API via API Gateway - and provides users more dynamic functionality.

Yes - the vendor lock-in is a major downside. Serverless isnt for everyone, neither are the big cloud vendors... YMMV.

Re: A serverless email server on AWS using S3 and SES

#238

Earlier quoted context omitted.

Fraud detection is such a frustrating double edged sword. They can’t share what was detected or why because the bad guys will start taking it into account. That leaves us with manual human review as the only means to address false positives. But that doesn’t scale so it’s either backlogged, low quality or nonexistent.

Rather seems likely laziness hiding behind the guise of "security". Such a bad user experience is inexcusable.

It’s not a “guise” and not out of laziness.

It’s impossible to guarantee that the reason can’t get back to bad actors if you give that information out to anybody, so that information isn’t given out. If you can figure out a way, you’d have a bigger license to print money than Google and Amazon, combined. The problem is, rfc-3514 aside, there’s no evil “bit” and no way to tell if the person making a request is good or bad, or if they’re even the person who’s account they’re using. Don’t forget the possibility of an “inside job” either.

Sorry for the bad developer experience, but fighting all the various kinds of fraud is harder than it looks. Thankfully ML's made strides in this area.

Re: A serverless email server on AWS using S3 and SES

#239
post #53

Earlier quoted context omitted.

If you're running a saas and the increased traffic comes from paying customers, you likely prefer a huge bill to downtime. But apart from that, there's a huge benefit in saying "I'm happy to spend any amount up to X" and not needing to do any capacity planning beyond that vs. continually trying to guess what's the right % to over-provision your VMs and having downtime when you get it wrong.

Yep, but how can you be sure the serverless provider will never go down? I've witnessed multiple times when AWS's services went down. > If you're running a saas and the increased traffic comes from paying customers, you likely prefer a huge bill to downtime. Well, in such situation, I would probably run more advanced container orchestrators such as Kubernetes which you will then configure to automatically spawn the a…

The serverless provider can go down just like the VM provider can go down, but the key difference is that it won't go down due to traffic bursts.

Auto-scaling helps, but it still takes awhile to spin up new VMs, and you'll have downtime in the meantime for sufficiently large bursts.

On lock-in, in my experience with any non-trivial infrastructure you end up tied to your provider anyway. You're still going to need IAM users and VPCs and subnets and provider-specific auto-scaling and all that jazz. Serverless lock-in is deeper, but either way switching is a big project.

Re: A serverless email server on AWS using S3 and SES

#240

I don't know anything about serverless --- to this day I fail to understand what this word is even supposed to mean. And the deployment diagram[1] sure looks complicated to me. I think I prefer old-school servers. [1]: " rel="nofollow">https://raw.githubusercontent.com/0x4447/0x4447-product-s3-e...

My biggest problem with the "serverless" term is that it's a solution to a few different problems conflated into one term. * Not having to manage a server. * Not having to have dedicated resources which can be wasteful. * Having an architecture that scales. When most people talk about serverless, they mean something that solves all three of those problems. When I think of serverless, I think it only needs to solve th…

Sounds like a webhost.
Post reply on HN