amazon-ec2

How access to localhost:4200 running on ec2 instance

How access to localhost:4200 running on ec2 instance Question: On my EC2 I have loaded a python script running a prefect flow and I want to access to the UI from a web browser. This UI is running on localhost:4200. [ec2-user@ip-xxxx-xx-xx-xx ~]$ prefect orion start ___ ___ ___ ___ ___ ___ _____ ___ ___ ___ …

Total answers: 2

How to filter Amazon EBS snapshots by image (AMI) ID?

How to filter Amazon EBS snapshots by image (AMI) ID? Question: I would like to get all Amazon EBS snapshots that are associated with a certain AMI (image). Is that possible? I can filter by tag ie. previous_snapshots = ec2.describe_snapshots(Filters=[{‘Name’: ‘tag:SnapAndDelete’, ‘Values’: [‘True’]}])[‘Snapshots’] for snapshot in previous_snapshots: print(‘Deleting snapshot {}’.format(snapshot[‘SnapshotId’])) ec2.delete_snapshot(SnapshotId=snapshot[‘SnapshotId’]) Is there a filter …

Total answers: 1

Sorting All Route 53 Domain Names and Comparing with EC2 Instances

Sorting All Route 53 Domain Names and Comparing with EC2 Instances Question: My task is to clear out our Route 53 from all the old Domain names. We have 700 records but only 200 running instances. I have tried AWS CLI to get the EC2 instances IP address which worked fine. I can’t seem to …

Total answers: 2

How do I publish a port at run time of a Docker image on Amazon Ec2?

How do I publish a port at run time of a Docker image on Amazon Ec2? Question: Currently, my Docker image runs as expected when run with the following line inside VSCode’s CLI. docker run -it -d -p 5000:5000 flaskapp This allows me to open up http://localhost:5000/ and access it. However, if I were to …

Total answers: 1

libGL.so.1 missing on Amazon Linux 2022

libGL.so.1 missing on Amazon Linux 2022 Question: We are trying to execute a python program from e2 instance . but we are getting the below error. Attaching the error . sh-4.2$ python3 Landing.py Traceback (most recent call last): File "Landing.py", line 2, in <module> from PyQt5 import QtCore, QtGui, QtWidgets ImportError: libGL.so.1: cannot open shared …

Total answers: 1

AWS instance/controller node randomly unable to find files on FSX that is there

AWS instance/controller node randomly unable to find files on FSX that is there Question: This is a sporadic issue that I could not figure out a condition to replicate. The gist of the issue is that instance/controller node will randomly fail to find files that are already created on Amazon FSx. A sample script can …

Total answers: 1

Service gunicorn not starting code=exited, status=203/EXEC

Service gunicorn not starting code=exited, status=203/EXEC Question: I am trying to configure a gunicorn service on an Red hat EC2 vm of amazon. I created the sercvice file, but when I run it and check the status it tells me that it failed: [Unit] Description=Gunicorn instance for a simple hello world app After=network.target [Service] User=ec2-user …

Total answers: 2

Ignoring case sensitivity when filtering with boto3

Ignoring case sensitivity when filtering with boto3 Question: I’m trying to filter the list of EC2 instances that I get in my script. I want my search to be based on tags, as we tag instances based on their purpose (service machines, personal gateways, etc). I use this: client = boto3.client(‘ec2′, region_name=’eu-west-1’) results = ( …

Total answers: 1

How to install python 3.9 on Amazon Linux 2 with cloud-init and CDK

How to install python 3.9 on Amazon Linux 2 with cloud-init and CDK Question: I’m trying to install Python 3.9 an EC2 instance that uses Amazon Linux 2. I tried following this guide: https://computingforgeeks.com/install-latest-python-on-centos-linux/, and I was able to install Python3.9 manually on the EC2 instance by SSH’ing in and running the commands. I’m now …

Total answers: 1

Django application only working with port 8000

Django application only working with port 8000 Question: I am working on an project and I have hosted it on EC2 to see if everything is working fine or not. It’s only a single page application for now with no endpoint. Problem is it only works if I use my_domain:8000 or my_ip:8000. Here is the …

Total answers: 1