Questions tagged with Amazon Linux
Content language: English
Sort by most recent
Browse through the questions and answers listed below or filter and sort to narrow down your results.
Why isn't Amazon Linux 2022 available with Gamelift?
The "Comparing Amazon Linux 2 and Amazon Linux 2022" page at https://docs.aws.amazon.com/linux/al2022/ug/compare-al2-to-AL2022.html says: > Amazon Linux 2022 optimizes boot time to reduce the time from instance launch to running the customer workload. As such, this would be great for GameLift usage as it takes quite a while to launch instances in my experience. However, when using the AWS CLI to upload a build, the output for the "--operating-system" parameter only allows AMAZON_LINUX, AMAZON_LINUX_2 (and windows). Why is this? When will Amazon Linux 2022 be available with GameLift?
Debian-11 build process has lost its ethernet interfaces
We are using Yocto build-system (kirkstone) to compile images for i.MX8 based development board and we are trying to move the build process to AWS EC2 based environment for CI integration. We are currently using Debian (AMI: debian-11-amd64-20220503-998, type: t3.2xlarge) EC2 image from AWS marketplace. We have configured the EC2 machine with one external interface that binds to public IP and the machine is able to communicate with the outside world. This is the output of the `ip addr` from the login shell ``` admin@ip-XXX-XXX-XXX-XXX:~$ ip a show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000 link/ether XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff altname enp0s5 inet XXX-XXX-XXX-XXX/20 brd XXX.XXX.XXX.XXX scope global dynamic ens5 valid_lft 2992sec preferred_lft 2992sec inet6 XXXX::XXXX:XXXX:XXXX:XXXX/64 scope link valid_lft forever preferred_lft forever ``` But, after we try to compile our Yocto project we get several build errors due to fetch failing as some of our recipes fail to fetch sources from outside world. If I launch a development shell with `bitbake -c devshell my-app` it will no longer see the ethernet devices but only the local interface which is in down state and has no IP attached to it ``` admin@ip-XXX-XXX-XXX-XXX:~/yocto/build/tmp/work/x86_64-linux/my-app/1.0.0-r0/my-app-1.0.0$ ip a show 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:200:00:00:00 ``` and I can also see that resolving outside connections no longer work ``` admin@ip-XXX-XXX-XXX-XXX:~/yocto/build/tmp/work/x86_64-linux/my-app/1.0.0-r0/my-app-1.0.0$ traceroute6 www.google.com www.google.com: Temporary failure in name resolution Cannot handle "host" cmdline arg `www.google.com' on position 1 (argc 1) ``` This is the output from process tree ``` admin@ip-XXX-XXX-XXX-XXX:~/yocto/build/tmp/work/x86_64-linux/my-app/1.0.0-r0/my-app-1.0.0$ ps f PID TTY STAT TIME COMMAND 943 pts/1 Ss 0:00 /bin/bash 994 pts/1 R+ 0:00 \_ ps f 758 pts/0 Ss 0:00 -bash 830 pts/0 Sl+ 0:01 \_ python3 /home/admin/yocto/sources/poky/bitbake/bin/bitbake my-app -c devshell 941 pts/0 S+ 0:00 \_ sh -c screen -r devshell_939 942 pts/0 S+ 0:00 \_ screen -r devshell_939 ``` Another thing that seems off is that the build process has somehow lost all its groups and there is a group `nogroup` added ``` admin@ip-XXX-XXX-XXX-XXX:~/yocto/build/tmp/work/x86_64-linux/my-app/1.0.0-r0/my-app-1.0.0$ groups admin nogroup ``` When running the `groups` from the login shell the user has `admin adm dialout cdrom floppy sudo audio dip video plugdev netdev` that seem to be lost when launching the development shell. We are using the build system in multiple local development environments (based on Debian-11) and the build system is able to connect to outside world just fine so this relates to the AWS EC2 Debian image that we are using. Why are the interfaces not displayed and how can we work-around this issue so that the build process can access the source repositories from the build environment?
VirtualBox localhost "Login incorrect"
I am new to virtual machines, Linux and amazon so please bare with me. I have installed the virtual machine according to amazon's instructions listed [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html). I am able to boot in VirtualBox, but I am stuck on a sign in page that asks for: ``` localhost login: ``` rather than: ``` amazon login: ``` as I've seen others report. Now I have not made changes to the *meta-data *file in the ISO image, so all it says is: ``` local-hostname: amazon ``` with some additional commented lines regarding 'network-interfaces' that I am unfamiliar with. The server goes to "localhost" as a direct result of this, I guess? but I do not know the login for localhost and the users and passwords set in the *user-data* file do not work. If someone could point me in the right direction to set the proper network configuration or help with the credentials that would be greatly appreciated.
How to know exact version of Amazon Linux 2?
I need to know exact version of Amazon Linux 2, do someone know how to do it? I see in [release notes](https://docs.aws.amazon.com/AL2/latest/relnotes/relnotes-20220802.html) versions like `2.0.20220719.0`, but I'm not sure where the version can be obtained from. `/ets/os-release` contains only major version `2`
How to install openjdk-11.0.16 version in amazon linux 2
I have to install a specific version of openjdk i.e, openjdk-11.0.16 in amazon linux 2. I don't want to install coretto11. we can install using amazon-linux-extras install java-openjdk11, but this approach always installs the latest version and not the specific version I require. How to achieve this?
How to set Apache-accessible SELinux policy for EFS mounted user directories?
When I mount my EFS to a user directory, the directory policy becomes `system_u:object_r:nfs_t:s0`, which is too restrictive - I need it to behave more like a typical user directory, which is `unconfined_u:object_r:user_home_dir_t:s0`. How do I change this?
Elastic Beanstalk: New PHP 8.1 environment - git not availabe during deployment?
Running the default ``` /bin/sh -c composer.phar install --no-ansi --no-interaction ``` inside a PHP 8.1 environment (64bit Amazon Linux 2/3.5.0) currently results in an error, e.g. ``` In Git.php line 484: Failed to clone https://git.drupalcode.org/project/coder.git, git was not found, check that it is installed and in your PATH env. sh: git: command not found ``` However, git is installed: ``` [ec2-user@ip-172-31-4-122 ~]$ which git /usr/bin/git ``` There's no problem when performing a deployment inside a PHP 7.4 environment. I followed along [the documentation mentioned here](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-configuration-composer.html), but this only works for PHP based environments < PHP 8.1. The problem only exists when the system detects the `composer.json` file and automatically performs `composer install`, so it's possibly a PHP 8.1 environment related bug, s. also [this GitHub issue](https://github.com/aws/elastic-beanstalk-roadmap/issues/262). Is there any workaround? Otherwise it might work to upgrade an existing PHP 8.0 environment to PHP 8.1 until this is resolved for new PHP 8.1 environments.