Investigating Multi-Account IAM Issues in S3 and CloudFront
kevinslin.com
kevinslin.com
If you've already made any design decisions or need to do something differently than Amplify expects, it is a minor nightmare. It generates multiple local copies of templates for nested cloudformation stacks and doesn't really support manual editing. The basic Amplify CLI commands entirely abstract away what's actually happening with the AWS APIs. "Ejecting" takes loads of time to basically reverse-engineer the Amplify CLI, clean up the generated templates, and then create your own build process that you can tweak.
It would be much easier to recommend Amplify if it wasn't so far removed from the underlying AWS APIs and it provided an easy way to modify those API calls or templates instead of being stuck within its guard rails.
AWS really needs more centralized decision-making. It feels like individual product teams are allowed to go way off in the weeds without any frame of reference for whether their solutions make sense when plugged into the full suite.
I can't complain too much, it's a bit of job assurance for folks like myself that specialize in only AWS. Exhausting keeping up to speed on everything though.
the one use case i do like it for is hosting simple static sites (eg. jekyll based sites).
that being said, i do like the amplify javascript sdk, especially the auth library and react components: https://aws-amplify.github.io/docs/js/api
best part is that you can use the components without using the amplify service/console
> > When you see hoof prints, think horses not zebras.
Looked this one up and the original medical aphorism dates back to the 1940s and was 'When you hear hoofbeats' [1], in case anyone's curious.
Zebras All the Way Down - Bryan Cantrill, Uptime 2017
But when you stop and think about it, it's a similar model as Unix file/directory ACLs...I just hadn't expected it to apply to S3 buckets too.
I still have the tab open for the docs to fix access:
https://docs.aws.amazon.com/AmazonS3/latest/dev/example-walk...
It feels like a common pattern to consolidate your logs into a single account for analysis, I wish they made it more straightforward to setup.
One workaround I've heard of is S3 replication. I've not tried it yet but apparently the replica has the 'correct' ownership.
Here's a classic: I had a lambda fed by an even stream hanging off a Dynamo table. The lambda would delete the record after doing a bit of stuff. I didn't realize on my first pass that this would trigger the lambda again... Wasn't a big deal as I noticed the behavior pretty quickly.
"It does not work on any subdirectory (such as http://www.example.com/about/). If you were to attempt to request this URL through CloudFront, CloudFront would do a S3 GetObject API call against a key that does not exist."