So here's an @awscloud Lambda@Edge problem that's haunted me for ages. A thread, as I thrash and attempt to learn the things I don't know...
Curling the official @awscloud status page takes .3 seconds to complete. If I curl stop.lying.cloud, that takes 23 seconds to complete. And it absolutely should not.
The domain points to a CloudFront distribution. That distribution invokes a Lambda function that returns HTML with my suitable modifications to the payload.
"Okay Corey, you probably write code like crap."
Sure I do, but @epsagon shows that it's not the code that's hanging at all.
Unfortunately I can't get tracing to work in edge Lambdas (they don't support layers) so I'm at a bit of a loss. Let's look at the CloudFront distribution logs.
Given that it's over 20 seconds, it *feels* like there's a timeout that eventually gives up, returns what it has--and that renders as what I want. But I'm mystified as to where that's happening.
I’m gratified so far that everyone’s suggestions have been red herrings. I was kinda worried it’d be “a checkbox” or something. I may have to open an @AWSSupport ticket.
My assistant is almost as confused as I am.
Just to call this out explicitly: it's a near-certainty that the bug is on my side, either with code or configuration. I'd be *shocked* if this were @awscloud's fault in any meaningful way past "it's hard to observe what's going on with Lambda@Edge functions."
• • •
Missing some Tweet in this thread? You can try to
force a refresh
It's the AWS infrastructure keynote with Peter DeSantis, and this is my #reQuinnvent livetweet thread. Like an @awscloud groundhog, this is the one day a year he comes out of the data center to tell us what he's seen, look for his shadow, and use the bathroom.
♪ ♫ ♬ He's coming out of his cage, and he's feeling just fine... ♪ ♫ ♬ #reinvent
Music in a minor key about adversity is a great choice to kick off a keynote about infrastructure. Hardware is always depressing; it's a real kick in the rack nuts. #reinvent
And now the Data Analytics leadership session at #reinvent--oh what the damn hell. @rahulpathak didn't dress up for our podcast recording nearly so well!
This entire slide also applies to the @awscloud bill.
"Here's how Moderna uses our services to fight the pandemic, so you can feel better about using those same services to show ads to people."
Skipping past the recap of existing security services. There are a LOT of them. If you enable all of them it will cost you more than a data breach would. #reinvent