You really can't go wrong with either - use what you prefer.
I have the same question / concern.
I think it's great that AWS are offering their own flavour of Linux, but doesn't that result in added risk of vendor lock-in?
Whereas with an Ubuntu instance, one can change cloud providers quite easily [0], without being tied into AWS-specific Linux configurations [1].
[0] I think AWS is great, so this is more a hypothetical scenario.
[1] I say this knowing little about AWS Linux and the degree to which it has custom configurations that can't easily plug-and-play on other distros.
Would appreciate insight from someone who can speak to this risk from experience.
Ideally you build your software such that the OS is just an implementation detail that’s abstracted away. In the server world a switch from RHEL to Ubuntu is not as hard as a move from, for instance, Google BigTable to AWS DynamoDB
AM2 is able to run in other places so there doesn't seem to be much vendor lock-in compared to a service like DynamoDB, though.
* It has support for all new instances/hardware/services on day 1
* It's optimised for AWS, sometimes a bit faster than Ubuntu
* It has a good balance of freshness, stability and long term support
* It comes with integrations to all of AWS services and ecosystem
* It's the default choice, and often the least hassle
* It's fully supported by AWS
* It's the only realistic choice for some services (e.g. Lambda, Elastic Beanstalk)
I'm surprised to read that. Coming from Ubuntu and in the last couple years NixOS I've found the Yum repos for Amazon Linux woefully stale.
It provides newer versions for a few key packages, e.g.: Docker 20.10, PostgreSQL 13, Ruby 3.0, Kernel 5.10, nginx 1.20, PHP 8.0, Python 3.8, Redis 6.2, Go 1.15, Rust 1.47, etc.
Some newer packages, e.g. OpenSSL 1.1.1 and zsh 5.7 are provided in the main repo.
Outdated packages wasn't a major pain point in my experience. The bigger issue is a relative small selection of packages.
These are either available via 3rd party repos (e.g. NodeJS) or EPEL (e.g. libsodium), or by recompiling Fedora SRPMS. That can be an inconvenience, but not a big deal overall.
I hope the situation will improve once AL2022 is out, as Fedora comes with a much wider selection of packages.
...and with this new version, a great support for SELinux too (because of Fedora). Some don't like the push for Snaps as well.
I think SELinux is one of the biggest differences and the hardest to adapt to (as changing apt to dnf is not hard).
If you want a good starter on SELinux, my whole book on deployment[0] is SELinux ready with a full dedicated chapter on SELinux and a SELinux cheatsheet. Today also with a 33% off for Black Friday ("blackfriday" discount code at checkout).
Of course I would prefer they use Fedora and contribute to Fedora directly.
Meanwhile, the same issue was actually fixed once and for all on GCP: https://news.ycombinator.com/item?id=8732356