Is-there an easy way to upgrade from Amazon Linux AMI to Amazon Linux 2 AMI, or do I have to create a new instance and do again all my server setup ?
Thanks for your feedback,
There is no easy way. You have to create a new Linux 2 instance.
From: Amazon Linux
If you are currently using the Amazon Linux AMI, we recommend that you
migrate to Amazon Linux 2. To migrate to Amazon Linux 2, launch an
instance or create a virtual machine using the current image. Install
your application on Amazon Linux 2, plus any packages required by your
application. Test your application, and make any changes required for
it to run on Amazon Linux 2.
Related
I'm trying to use the aws inspector service (the new one, not the classic one) and I created an Amazon Linux 2 instance, and I attached the AmazonSSMManagedInstanceCore role and so the instance appeared in the fleet manager but the aws inspector doesn't find any package vulnerabilities in the instance. I can only make it work when I choose the "Amazon Linux 2 AMI with Amazon Inspector Agent" image. Is there something missing to make it work in the default instance?
I already tried using the default Amazon Linux 2 instance, but it only worked with the instance with the agent already installed
The Amazon Inspector Agent needs to be installed in order to run the Amazon Inspector. If you want to use the default AMI or any other AMI. You can use userdata to install the Amazon Inspector Agent or run SSM document to do the installation.
https://docs.aws.amazon.com/inspector/v1/userguide/inspector_installing-uninstalling-agents.html#install-linux
I have my existing servers on Amazon Linux, now we are planning to upgrade it to amazon linux2. How do we do that?
Do we have a set of steps to upgrade or do we need to launch a new Ec2 instance using Amazon Linux2 Image and re-install our apps on top of it?
From Amazon Linux 2 FAQs:
Can I perform an in-place upgrade from an existing version of Amazon Linux AMI to Amazon Linux 2?
No, an in-place upgrade from the existing Amazon Linux image to Amazon Linux 2 is not supported. We recommend that you test your application on a fresh installation of Amazon Linux 2 first before migrating.
Is there a way to auto-install AWS Systems Manager on the existing AWS EC2 instances.
I see the SSM agent is pre-install on Amazon Linux, but how about the other OS like Redhat, ubuntu, centos?
how about the other OS like Redhat, ubuntu, centos?
Ubuntu also has pre-installed SSM Agent. From docs:
SM Agent is preinstalled, by default, on the following Amazon Machine Images (AMIs):
Amazon Linux
Amazon Linux 2
Ubuntu Server 16.04
Ubuntu Server 18.04
Amazon ECS-Optimized
For the remaining AMIs, you could install the agent as described in the docs and create a custom AMI. This way you do it only once, and re-use the custom AMIs.
As an alternative, a User Data could be used to automate the installation of the agent whenever an instance is launch.
I created multiple (say 16) AWS EC2 ubuntu instances such as:
I want to keep these instances to have the same settings for later jobs. My question is how I could manage them jointly. For example, how could I install Docker in all of them at once and so that I can use docker swarm?
Ideally you would actually configure the server build before you deploy the 16 instances.
You would launch a fresh Ubuntu server and install all of the software on it with its configuration. Once all software is installed you'd create an AMI. When you go to launch the 16 servers you'd go ahead with launching them from your AMI instead of the Ubuntu image.
To follow best practices you'd not do this installation by hand, instead using a configuration automation tool such as Ansible, Chef or Puppet to configure the server to your liking.
You can make use of aws user data to install same software on all the instance during ec2 creation.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
I am trying to install GUI on my Amazon Linux 2 AMI. I tried several solutions like GNNOME and Mate Desktop, but when I try to install desktop by group list I get a warning:
group Desktop does not exist or GNOME does not exist.
How can I resolve this issue?
This is now supported.
See this article in the AWS knowledge base:
How do I install a GUI on my Amazon EC2 instance running Amazon Linux 2?
Last updated: 2021-04-20
I want to install a graphical user interface (GUI) in my Amazon Elastic Compute Cloud (Amazon EC2) instance running Amazon Linux 2. How do I do this?
Short description
To install a GUI on your EC2 Linux instance, do the following:
Install the MATE desktop environment. MATE is a lightweight GUI based on GNOME 2 available as an extra for Amazon Linux 2. The Amazon Linux 2 offering of Amazon WorkSpaces uses MATE. For more information about MATE, see the MATE desktop environment website.
Install a virtual network computing (VNC) service, such as TigerVNC. For more information about TigerVNC, see the tigervnc.org website.
Connect to the GUI using the VNC.
(Optional) Install a web browser, such as Firefox or Chromium. For more information on Firefox, see the mozilla.org website. For more information on Chromium, see the chromium.org website.
Note: These instructions apply only to Amazon Linux 2. To confirm the version that you're running, run the following command:
cat /etc/os-release