Questions tagged [amazon-linux-2]
251 questions
63
votes
2 answers
How to install NGINX on AWS EC2 Linux 2
I'm new to AWS and trying to understand which version of NGINX I should be installing on my instance. I've found multiple options;
Via EPEL as the blog entry
Amazon's own (?) version as this answer
The 2016 NGINX official tutorial
On my…

mapping dom
- 1,737
- 4
- 27
- 50
43
votes
5 answers
Find if AWS instance is running Amazon Linux 1 or 2?
In AWS I need to add amazon linux instance to domain based on this article.
However how do i know which Amazon Linux version the instance is using.
I do not have access to AWS console. But i do have access to actual instance.
What linux command i…

LP13
- 30,567
- 53
- 217
- 400
36
votes
9 answers
AWS Elastic Beanstalk logging with python (django)
How do you manage your application logs in AWS elastic beanstalk? Which file you write you application logs to?
I'm using the following Logging configuration in my development environment but this doesn't work when I deploy in AWS.
DEBUG_LOG_DIR =…

user1126167
- 702
- 2
- 6
- 11
15
votes
3 answers
useradd not in amazonlinux base image
It seems that useradd is not in amazonlinux docker base image.
useradd will work when when my Dockerfile install openldap-devel, so RUN useradd my_user will work when I my image have the following:
FROM amazonlinux
RUN yum -y install python3 \
…

Demeter P. Chen
- 823
- 1
- 7
- 16
14
votes
3 answers
Command 01_migrate failed on Amazon Linux 2 AMI
I have a Django project which is deployed to Elastic Beanstalk Amazon Linux 2 AMI. I installed PyMySQL for connecting to the db and i added these lines to settings.py such as below;
import pymysql
pymysql.version_info = (1, 4, 6, "final",…

Aslı Kök
- 616
- 8
- 19
13
votes
5 answers
nodejs-16 dependency issue with libuv
This is what I'm getting on my Amazon Linux 2 instance while trying to run yum update.
Do you suggest I use --skip-broken or wait until AWS rolls out a fix?
--> Processing Dependency: libuv >= 1:1.42.0 for package: 1:nodejs-16.13.2-8.el7.x86_64
-->…

Alexandre Martini
- 389
- 1
- 4
- 14
12
votes
3 answers
Where are my environment variables in Elastic Beanstalk for AL2?
I'm using elastic beanstalk to deploy a Django app. I'd like to SSH on the EC2 instance to execute some shell commands but the environment variables don't seem to be there. I specified them via the AWS GUI (configuration -> environment properties)…

Xen_mar
- 8,330
- 11
- 51
- 74
8
votes
1 answer
how to install snap on amazon linux 2
How can I install snap on my amazon linux 2?
I've gone through a few links on the web:
https://github.com/albuild/snap
https://forum.snapcraft.io/t/cannot-install-snapd-on-amazon-linux-2/20824/4
I can't seem to find correct instructions to install…

vee
- 680
- 1
- 10
- 27
8
votes
4 answers
How to extend nginx config in elastic beanstalk (Amazon Linux 2)
I followed the advice here to configure the nginx reverse proxy to allow files larger than the default 1mb. So, my code in
/.platform/nginx/conf.d/prod.conf
looks like this:
http {
client_max_body_size 30M;
}
However, this seems to have no…

adam tropp
- 674
- 7
- 22
8
votes
1 answer
Amazon Linux 2 OpenVPN client package unavailable?
When I try to run sudo yum install openvpn on an Amazon Linux 2 instance that I just created, I receive the message
No package openvpn available
Do I need to add a package repository? I don't find mention of needing to do so anywhere.

Josh Russo
- 3,080
- 2
- 41
- 62
8
votes
3 answers
How to install newer version of R on Amazon Linux 2
For whatever reason, Amazon moved R to the so-called "Extras Library" so you can't install R using sudo yum install -y R anymore. Instead, you have to do sudo amazon-linux-extras install R3.4. As a result, I can only install R 3.4.3 when the newest…

Vince
- 305
- 1
- 3
- 7
7
votes
1 answer
python3.8 devel package for amazon linux
I'm building a docker image based on amazonlinux:2.0.20210126.0, my software needs to compile and requires Python.h and other dev resources. I'm installing python3.8 like this in my docker file:
RUN amazon-linux-extras enable python3.8
RUN yum…

M. Sh
- 123
- 2
- 7
7
votes
1 answer
Access Elastic Beanstalk environment properties in NGINX configs running on AWS Linux 2
I had this working before on AWS Linux AMI but no luck with AWS Linux 2.
I need to access my environment properties from the Nginx configuration file during the EB application deployment. It's a Single instance Node Server.
I did it like this with…

Getter Jetter
- 2,033
- 1
- 16
- 37
7
votes
1 answer
amazon linux on premise: yum update fails
I Just installed amazon linux on my windows 10 hypervisor using aws provided image from amazon. I am able to login successfully. However when I do yum install anything it just fails with error "Could not resolve host: cdn.amazonlinux.com". Following…

Avnish
- 1,241
- 11
- 19
7
votes
2 answers
Ansible module for aws extras analgous to the yum_repository
AWS' Linux 2 has a facility "Amazon Linux Extras" which provides additional repos for assorted things (nginx, php, mariadb, etc. etc.).
I'm surprised that I can't find an Ansible module(s) for this feature. I found an repo in github for this, but…

Ben Hyde
- 1,503
- 12
- 14