Amazon Linux AMI is a red hat based distro so things like the package installer or the tools for service manage are different, and another thing you need to consider is the way of bootstraping, amazon instances are more flexible to do some things in cloudformation in the ubuntu way the best form to do it is with cloudinit https://help.ubuntu.com/community/CloudInit, you need to consider the packages too are multiple packages that not are native supported by Amazon Linux.
Answer from Douglas Lopez on Stack OverflowAmazon Linux AMI is a red hat based distro so things like the package installer or the tools for service manage are different, and another thing you need to consider is the way of bootstraping, amazon instances are more flexible to do some things in cloudformation in the ubuntu way the best form to do it is with cloudinit https://help.ubuntu.com/community/CloudInit, you need to consider the packages too are multiple packages that not are native supported by Amazon Linux.
Amazon Linux AMI based on CentOS 6.x, whereas Amazon Linux 2 is CentOS 7.x,
So instead of apt you would use yum,
and instead of /usr/local/bin/composer you'll have to use /usr/bin/composer
...
I was in a similar situation; fully managed dedicated server, LAMP, CentOS. Then we decided to move to EC2. Also, I had very little systems or linux administration experience. I have almost zero experience with Ubuntu, so I really cannot speak to which is the so-called better OS.
I tried a bunch of pre-built AMI's with minimal OS installs from Rightscale, Alestic, Scalr and Amazon. I ended up building all my own AMI's on top of Amazon Linux, first using version 2010.11.01, now I've migrated all my custom AMI's to Amazon Linux version 2011.03.01.
The decision to go with an Amazon Linux AMI vs the other AMI providers was not an easy one. I played around with and tested different setups for close to a month before I made my final decision. In the end, since I wanted to use CentOS, it basically boiled down to one thing. I figured who better to know what hardware related dependencies needed to be included in the OS than the people who designed, built and maintain EC2. Nothing against Rightscale, Scalr or Alestic.
Six months later, even though I hit a few bumps in the road, Amazon's Linux has been quite stable. Though, I did decide to compile some of the software we use from the source (ie. php 5.3, MySQL 5.5, etc) because I ran into trouble with the pre-built packages Amazon maintained in their package repository.
Amazon Linux is a rolling distro, like Fedora, or Debian Testing (sort of). In my view it is not suitable for any production product whatsoever. I'm surprised more people do not realize this. This means if you launched your Amazon Linux instance, say, 450 days ago and do an update today, you will be pulling updates from an entirely different release. Once a new release is made, you have no buffer time, you immediately start pulling updates from the new release. As you can imagine, this may pull in a cascade of dependencies, and has a tendency to break things. For this reason it is inherently unmanageable. You cannot work something like this into an update policy without it being an absolute mess. Do not use Amazon Linux for anything serious.
Ubuntu LTS is a fine choice, as is Debian Stable or CentOS. All of those give you many years of updates to the same release.
Amazon Linux also has no bug tracking system, users must post questions in the AWS Developer Forums to file a bug against a package! There is no way to search for bugs, either. This should be a showstopping issue for almost everyone.
Amazon Linux makes it very difficult to retrieve source packages, needlessly.
Amazon Linux vs Ubuntu
Acloud
Amazon Linux vs Ubuntu for EC2
Is my Amazon EC 2 running Amazon Linux or Ubuntu? - Stack Overflow
Videos
EDIT: Issue was using the instance wizard that shows up right after creating a free tier. The regular wizard did not have the ssh problem.
I created an Ubuntu EC2 instance and couldn't ssh to it, getting "resource temporarily unavailable". Played with firewall and security group settings but no dice.
I then tried an Amazon Linux AMI and ssh worked. Is this home court advantage?
I understand that Amazon Linux AMI comes with a bundle of apps that might be useful for integration with AWS.
Apart from that, is there any reason to choose Amazon Linux over Ubuntu or Debian?
Is Amazon Linux more secure, or faster, lighter, more performant at networking , etc than Ubuntu LTS?
This is definitely Amazon Linux (CentOS based), not Ubuntu. Another hint is that the default username in Amazon Linux is usually "ec2-user" while in Ubuntu it is "ubuntu" (at least if you use the default stock AMI). I don't know how it can be different from what you selected when you created it, but I guess it's either a human error or a weird bug.
Edit: For the record, the problem was that he was using an old EBS volume (which had Amazon AMI) as root volume.
ami-acf6b0fe is indeed an official Ubuntu 12.04 LTS Precise AMI in Amazon EC2's ap-southeast-1 (Singapore) region.
The welcome message you list is indeed for Amazon Linux.
This means that the EC2 instance listed in your AWS console is not the EC2 instance you are connecting to with ssh.
You should double check IP addresses, hostnames, instance ids, AWS accounts, and EC2 regions.
Very worried I am going to end up on a upgrade treadmill moving my instances (100's) to AL2023 and beyond. Huge engineering an QA effort moving from AWS Linux 1 to 2, only to deal with having to do this all over again next year. I've read AWS Linux is "optimized" for AWS hardware, but these are web and application servers that aren't CPU heavy, my thought is performance difference is negligible in this case.
So the real issue to me is in-place upgrades, looking for the cleanest path without have to rebuild the servers from scratch. Given that statement, my sense is Ubuntu 22.04 and up is more likely to have a seamless in-place upgrade path than AL2023 and its successors. Plus, I've had much more luck tracking down older more obscure packages on Ubuntu as opposed to AWS Linux which always seems like a painful hunt.
Appreciate anyone's experience/advice.