Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
StumblyWumbly
Sep 12, 2007

Batmanticore!
I'm in the middle of a bit of a minefield. My company had some consultants build up this customer facing system on AWS, and then everyone involved in the project left. Now I, with my background in embedded C and FPGAs, am maintaining it. It's pretty neat and fun to learn about, but now the Amplify build system is having dependency issues, possibly centered around eslint.

I tried reproducing the issue locally, but I'm getting different errors and probably using different versions of NVM or whatever, a tool I've only vaguely been aware of before today.

Any general tips or resources for resolving this kind of dependency or Amplify issue?

Adbot
ADBOT LOVES YOU

jiffypop45
Dec 30, 2011

Last time I tried to use amplify it was broken AF and most of my issues were bugs (memory leaks were a big one) that the dev discord (your only way of interacting with them) was not interested in fixing. At the time the only way I got engagement was by harassing the oncall via slack internally.

So I wouldn't recommend that product at all however if you're stuck with it that's something else entirely.

StumblyWumbly
Sep 12, 2007

Batmanticore!
All we're doing is using Amplify to grab our repo from GitHub, run npm and do some basic database setup. The issue is probably more of a JavaScript thing that something happened since September and now our dependencies are bad. But I have no way to run this locally or get more info than some cryptic error messages, because of course our logs don't include package-lock.json.

PierreTheMime
Dec 9, 2004

Hero of hormagaunts everywhere!
Buglord
Is there a proper way to assume a users identity when running shell commands using SSM agent via Step Functions call? On a Linux host by default your session starts as root, and commands to temporarily act as another valid user such as “su - <username>” does not actually work, even if it does as root in a normal session. “runuser - <username> -c “<some command>”” works but I’m trying to run a multiline shell script that uses variables gathered by an upstream Lambda to invoke a legacy executable that can’t (won’t) be Docker-ized. It might be possible to modify the default agent user, but instance admins want it as root to use it for maintenance/installs.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
Is there any sort of 'community' around Redshift? I can't find any discords/slack channels/user groups/bloggers etc... Maybe the SQL Server and Postgres communities have spoiled me.

Where do all the Redshifters hang out?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Hughmoris posted:

Is there any sort of 'community' around Redshift? I can't find any discords/slack channels/user groups/bloggers etc... Maybe the SQL Server and Postgres communities have spoiled me.

Where do all the Redshifters hang out?

Maybe they hang out on whatever is hosting those Google results that always have a solving my exact problem but I can't view the solution because I don't have a license??

Orbis Tertius
Feb 13, 2007

Not sure this is the right thread for this.

I’m interested in email SaaS architecture, but this seems to be one of those things that’s difficult to Google for. As in, how Sendgrid, Mailchimp, Mailgun, Amazon SES, etc work.

Im guessing there’s a DNS part, scalable vms hosting SMTP (just guessing) part, and an orchestration part. Among other more general saas things (api, auth services, whatever)

Anyways any insights (general or implementation specific) would be appreciated. Again, I’m finding it hard to do basic research on this so any info is appreciated.

Orbis Tertius fucked around with this message at 05:00 on May 18, 2023

jiffypop45
Dec 30, 2011

Orbis Tertius posted:

Not sure this is the right thread for this.

I’m interested in email SaaS architecture, but this seems to be one of those things that’s difficult to Google for. As in, how Sendgrid, Mailchimp, Mailgun, Amazon SES, etc work.

Im guessing there’s a DNS part, scalable vms hosting SMTP (just guessing) part, and an orchestration part. Among other more general saas things (api, auth services, whatever)

Anyways any insights (general or implementation specific) would be appreciated. Again, I’m finding it hard to do basic research on this so any info is appreciated.

Are you trying to roll your own? Curious what your use case for this is as I imagine the arch is probably not going to be super public necessarily as I work at one of the 4 you listed presently and worked at another previously.

Orbis Tertius
Feb 13, 2007

jiffypop45 posted:

Are you trying to roll your own? Curious what your use case for this is as I imagine the arch is probably not going to be super public necessarily as I work at one of the 4 you listed presently and worked at another previously.

The business concept is a transactional-only email service that has restrictions and limits in place to make it non-viable for marketing (or spam) email, and by being such dispose with the rigamarole and bullshit you usually have to go through to use such SaaS services.

I have some ideas what those ‘limitations’ might be to make that actually work, but without some way forward (basic info) on architecting the thing I’m kind of at a loss. I have enough experience with cloud poo poo, generally speaking, to do this (or come up with a spec at least), I just need more specifics about the specific domain (cloud based email)

absent any direction I was planning on just deep diving SMTP (which I’m only superficially familiar with) and seeing where that goes (this will be necessary regardless so not a bad starting point)

Orbis Tertius fucked around with this message at 06:50 on May 18, 2023

Docjowles
Apr 9, 2009

Godspeed. Dealing with email is to operations as dealing with printers is to IT support. Every company I've worked for that decided to send their own bulk email vs use a SaaS, it's consumed an insane percentage of my time. A lot of it just comes down to all the reputation management stuff you need to do to ensure your IP's aren't getting blacklisted, despite your users' best efforts to send mega spammy poo poo (and then come yell at you to ask why their mega spammy poo poo is being flagged as spam). Also the configuration files for whatever underlying MTA you select (exim, postfix, etc) are abominations that are basically their own general purpose programming language. I am extremely glad I don't have to work with bulk email much in my current role.

edit:

SMTP itself is a very simple protocol. Which is actually the problem; it was built for a time when everyone on the internet knew each other personally cause there were like 100 users and they were all at universities and government labs. Similar to BGP. So more and more protocols and standards have been tacked on over time, all of which you also need to deeply understand to run a modern email infrastructure that isn't firing every message directly into spam folders, or accidentally being left open as a relay for spammers to abuse.

Docjowles fucked around with this message at 17:12 on May 18, 2023

Just-In-Timeberlake
Aug 18, 2003

Docjowles posted:

Godspeed. Dealing with email is to operations as dealing with printers is to IT support. Every company I've worked for that decided to send their own bulk email vs use a SaaS, it's consumed an insane percentage of my time. A lot of it just comes down to all the reputation management stuff you need to do to ensure your IP's aren't getting blacklisted, despite your users' best efforts to send mega spammy poo poo (and then come yell at you to ask why their mega spammy poo poo is being flagged as spam). Also the configuration files for whatever underlying MTA you select (exim, postfix, etc) are abominations that are basically their own general purpose programming language. I am extremely glad I don't have to work with bulk email much in my current role.

AWS will shut you down so loving fast if your sender reputation is even slightly questionable.

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost

Orbis Tertius posted:

Not sure this is the right thread for this.

I’m interested in email SaaS architecture, but this seems to be one of those things that’s difficult to Google for. As in, how Sendgrid, Mailchimp, Mailgun, Amazon SES, etc work.

Im guessing there’s a DNS part, scalable vms hosting SMTP (just guessing) part, and an orchestration part. Among other more general saas things (api, auth services, whatever)

Anyways any insights (general or implementation specific) would be appreciated. Again, I’m finding it hard to do basic research on this so any info is appreciated.
Hi, I worked as a lead engineer at an e-mail / messaging service provider sending billions of e-mails monthly for some rather well-known companies in the US and overseas. There's a LOT of industry secrets for sending e-mail at scale because spammers are watching and trying to circumvent all these things. The industry standard commercial software product for a MTA (PowerMTA) basically was written for the late 90s and basically milks the ever-shrinking industry, and the others are basically custom for a massive provider like Gmail and Sendgrid, or barely used despite all the advertising dollars spent on it to try to supplant the ancient relic of PowerMTA. E-mail sending is such a strange, awful setup that even one of the big software companies approached us to be their e-mail provider and they were weighing between writing it themselves or signing a contract with us.

You're forgetting that the infrastructure to handle e-mail is very, very, very stateful and oftentimes requires long-lived TCP connections with a Wild West of crazy SMTP servers on the other end along with systems like Spamhaus and IP reputation systems shared across everywhere. Also add in verification systems to your domain such as DKIM, SPF, and DMARC standards for starters that can be a pain if you're not extremely vigilant about your DNS records. So unless your infrastructure is able to hand off TCP connections and their flow states across machines you're not going to get anything resembling stateless deployments for this kind of software or you're going to do some funky things to perform load balancing and packet routing within your infrastructure.


You can send e-mails at volume (more than n thousand / month I think?) with AWS if you sign an agreement with AWS that you're an actual e-mail vendor of some sort and that you'll be vigilant about spam reports at a legal level.

Docjowles
Apr 9, 2009

necrobobsledder posted:

You can send e-mails at volume (more than n thousand / month I think?) with AWS if you sign an agreement with AWS that you're an actual e-mail vendor of some sort and that you'll be vigilant about spam reports at a legal level.

Oh yeah this reminds me that you will start getting actual death threats from unhinged lunatics to your abuse@ address if they ever receive something they perceive as spam, lol

Startyde
Apr 19, 2007

come post with us, forever and ever and ever

Docjowles posted:

Oh yeah this reminds me that you will start getting actual death threats from unhinged lunatics to your abuse@ address if they ever receive something they perceive as spam, lol

A lot of us remember

Docjowles posted:

when everyone on the internet knew each other personally cause there were like 100 users and they were all at universities and government labs

It's been a harrowing few decades

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
On the other hand, it's super cool in a CS class to see your professor open a telnet session to an SMTP server and execute the commands to send an email, and the poof an email shows up in your inbox.

vanity slug
Jul 20, 2010

email is a genuine nightmare and i am glad other companies maintain these sewers

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug
I think it's hilarious how it's like 'hey I want to send an email from server x to email address y in the same domain'

'Oh that's pretty easy, just boop beep telnet and you're good!'

'Oh great! I want to send that email to a hundred people on gmail now'.

'You'll need a multinational corporation and two ritualistic sacrifices'

I would blow Dane Cook
Dec 26, 2008
Is Azure allowed in here? The boss wants monitoring for certain 4xx HTTP errors in Azure App Services

The only options in the documentation are:

quote:

Http 401 The count of requests resulting in HTTP 401 status code.
Http 403 The count of requests resulting in HTTP 403 status code.
Http 404 The count of requests resulting in HTTP 404 status code.
Http 406 The count of requests resulting in HTTP 406 status code.
Http 4xx The count of requests resulting in an HTTP status code ≥ 400 but < 500.

We are looking for other errors that start with 4 but aren't these ones, I.E errors with a specific numbers but not these ones.

Having a count of all errors starting with 4 is not useful either.

The Fool
Oct 16, 2003


turn on application insights, you can do custom queries and alerts on built in logs, set up instrumentation in your app, build sli/slo's, the whole 9


it's slow and clunky, but it's the native azure solution

The Fool
Oct 16, 2003


for your use case you can write a custom query for the error code you want, then alert on it

I would blow Dane Cook
Dec 26, 2008
https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics

Do you mean this?

The Fool
Oct 16, 2003


That's for creating custom events from your application, http status codes should be logged automatically.

You would use log analytics to make a custom query, then alert from that if needed.

lazerwolf
Dec 22, 2009

Orange and Black
What are best practices for replaying failed Step Function executions?

LochNessMonster
Feb 3, 2005

I need about three fitty


lazerwolf posted:

What are best practices for replaying failed Step Function executions?

Are you looking at a specific scenario or in general?

In general it’s a good idea to look at your possible/actual failures and set IntervalSeconds (wait time before starting a retry), MaxAttempts and BackoffRate.

You can also use a Catch to handle known errors in a specific way.

If you’re using Lambda’s it’s best to handle your exceptions there instead of in the SF.

lazerwolf
Dec 22, 2009

Orange and Black

LochNessMonster posted:

Are you looking at a specific scenario or in general?

In general it’s a good idea to look at your possible/actual failures and set IntervalSeconds (wait time before starting a retry), MaxAttempts and BackoffRate.

You can also use a Catch to handle known errors in a specific way.

If you’re using Lambda’s it’s best to handle your exceptions there instead of in the SF.

Yeah let me elaborate a bit.

I have a Step Function pipeline set up that triggers off of s3 Create Object and ultimately interacts with a third party API. I have Retry for each lambda involved set up and I am catching any error with the third party api and am sending the caught messages to an SQS acting like a DLQ.

My question is about retrying caught SF executions. I'm picturing a scenario that maybe some aspect of the third party api changed and I need to update my code to handle it. Then I want to be able to replay some of the failed executions to process through the new code.

Adhemar
Jan 21, 2004

Kellner, da ist ein scheussliches Biest in meiner Suppe.
Do you need SF here? Sounds like a perfect use case for SQS + DLQ with a Lambda trigger off the queue. Then you get the redrive functionality for free.

LochNessMonster
Feb 3, 2005

I need about three fitty


Adhemar posted:

Do you need SF here? Sounds like a perfect use case for SQS + DLQ with a Lambda trigger off the queue. Then you get the redrive functionality for free.

Agree, the use case almost sounds like a text book example.

s3 event on object creation -> sqs -> trigger processing lambda.

You can manage error handling on the lambda and use a DLQ for permanent failures. Setup a cloudwatch alarm that informs you on failures (or trigger another lambda to do stuff with the events)

lazerwolf
Dec 22, 2009

Orange and Black

LochNessMonster posted:

Agree, the use case almost sounds like a text book example.

s3 event on object creation -> sqs -> trigger processing lambda.

You can manage error handling on the lambda and use a DLQ for permanent failures. Setup a cloudwatch alarm that informs you on failures (or trigger another lambda to do stuff with the events)

What is the benefit from sending the event to SQS first rather than triggering Lambda directly?

I could probably refactor my business logic to fit into one lambda function, I am trying to keep my logic into smaller lambdas orchestrated with SF rather than one larger lambda.

I failed to mention this but I am using Eventbridge rules to trigger the SF.

The data flow is:
s3 Object Creation -> Eventbridge Rule -> SF

Would this be what you both are suggesting?

s3 Object Creation -> Eventbridge Rule -> SQS -> Lambda/SF

lazerwolf fucked around with this message at 18:23 on Jun 13, 2023

Adhemar
Jan 21, 2004

Kellner, da ist ein scheussliches Biest in meiner Suppe.
I would go S3 -> SNS -> SQS -> Lambda.

Adding SNS is optional but provides decoupling and allows you to do add some other processing later if you want.

SQS (with DLQ) gives you great error recovery and let’s you absorb bursts nicely.

BaseballPCHiker
Jan 16, 2006

Does anyone know what will happen to existing ec2 instances running server2012 when that goes eol? Do they just get marked for deletion by AWS?

Trying to come up with good sticks to scare folks into upgrading or migrating their poo poo before October.

12 rats tied together
Sep 7, 2006

iirc if you go s3 -> sns you only ever get 1 sns topic per notification config, something to be aware of in case you might need more destinations later

you can mix queues and topics though to my recollection so it's not a big deal

lazerwolf
Dec 22, 2009

Orange and Black
Another question, for Lambdas that require external dependencies, what is the best way to handle this.

I found you could install the dependencies locally and zip up the entire folder with app code. Build a layer from the dependencies directory or build a docker image of your app and deploy that.

The Fool
Oct 16, 2003


not lambda but for azure functions

we used to zip everything up but now we do the container

Docjowles
Apr 9, 2009

I think either approach is ok. Personally I would put it in a lambda layer if you like lambda for this use case and intentionally want to use it. Otherwise put it in a container and use a more traditional container environment like ECS or k8s that doesn’t subject you to the various structures and limits of lambda.

12 rats tied together
Sep 7, 2006

just uploading a zip puts less requirements on the uploader which is good because uploaders tend to change over time and janitoring an uploader is all toil for no benefit

The Fool
Oct 16, 2003


I don't know about lambda, but azure functions support pulling from an acr natively, so we use the same container build and publish process across our whole environment

lazerwolf
Dec 22, 2009

Orange and Black
Do you all worry about cold start times for containers vs zip?

Startyde
Apr 19, 2007

come post with us, forever and ever and ever
They both go off like firecrackers. :v:

mondomole
Jun 16, 2023

BaseballPCHiker posted:

Does anyone know what will happen to existing ec2 instances running server2012 when that goes eol? Do they just get marked for deletion by AWS?

Trying to come up with good sticks to scare folks into upgrading or migrating their poo poo before October.

AWS is exceptionally good about backward compatibility so this may not be a good stick.

See https://aws.amazon.com/windows/faq/#eos-3

quote:

Q. How does EOS affect my existing instances on Amazon Web Services (AWS)?

There is no direct impact to existing instances. Customers can continue to start, run, and stop instances.
Microsoft will not provide patches for EOS products, unless customers purchase Extended Security Updates.

In fact, you can still run Windows Server 2003!

quote:


Microsoft Windows Server 2003

Windows Server 2003 has reached End of Support, AWS no longer publishes Server 2003 AMIs effective 1st July 2019. Customers with Custom AMIs and or existing instances may continue using them on AWS. AWS has no plans to remove the capability to run Server 2003 on AWS. For more detailed information on Server 2003 and other Microsoft Products that are no longer supported by Microsoft please see End of Support messaging.

As for scaring people, all of the news about ransomware seems like it would be scary enough for the C suite to want to act.

Adbot
ADBOT LOVES YOU

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

mondomole posted:

AWS is exceptionally good about backward compatibility so this may not be a good stick.

See https://aws.amazon.com/windows/faq/#eos-3

In fact, you can still run Windows Server 2003!

As for scaring people, all of the news about ransomware seems like it would be scary enough for the C suite to want to act.

Yeah, for the most part your EC2 instance getting ransomware'd isn't Amazon's problem, that's your problem. But uh...it is a problem. Go find some particularly juicy ransomware stories and start trotting it out every time someone balks at migration plans.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply