I created an aplication but Its is not linked to my domain exp: “site.com”, “www.site.com”, when I access it I get: I need to make my ElasticBeanstalk application connect to my domain (jamelaumn.com) im the owner here’s my application loadbalancer prints: currently I have no rules on EB LB My EC2 LoadBalancer:: Answer Based on the comments and your updates.
Tag: amazon-ec2
AWS boto3: how to get hourly price of a specific instance id
I’m trying to write a python script using boto3 in order to get hourly prices of an instance, given the instance ID. I should remark that I’m not speaking about costs that you can get from cost explorer, I’m speaking about nominal hourly price, for example for an ‘ec2’ instance. I’ve already found some examples using “boto3.client(‘pricing’,…)” and a bunch
How to install python 3.9 on Amazon Linux 2 with cloud-init and CDK
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 trying to setup the EC2 instance with a UserData script that calls some CloudFormationInit scripts to install dependencies, including
List the number of running instances in an AWS region
I want to list the number of all running ec2 instances in the us-west-2 region and I was able to list the instances but actually, I want the number of instance names is not nessosry. please see that below code Output is here Output type Answer You can store those names in a list, and check the list length:
Sorting a list of ec2 instances python
I have a python script which prints out a list of ec2 instances as follows : [‘i-06db4eb158ad0bdfd,2021-05-12 12:04:19+00:00,False’, ‘i-0f67cf99fb4536c3f,2020-10-14 13:32:23+00:00,asg-elk-‘, ‘i-0539c8dfc839cbfda,2020-10-26 07:38:01+00:00,asg-standalone’, ‘i-0f285277529543462,2018-05-18 16:47:00+00:00,False’, ‘i-0d649cebdf54bd2f4,2020-03-12 10:07:07+00:00,asg-ddf’, ‘i-01734dfef0159c5c8,2020-10-20 13:05:27+00:00,asg-pro’, ‘i-0ff596f1dc01b61d8,2021-03-17 11:21:21+00:00,asg-base-test’] I want to be able to sort the list out based on CreationDateTime. I have used the python built-in function sorted() but that doesn’t seem to be giving me the
Python Flask-Mysql KeyError: ‘MYSQL_HOST’
I am building a python flask-Mysql app. I am building it using AWS cloud9. But When I run the code I am geting MYSQL_HOST key error. I am attaching code below. Is it because of the installation fault or code error.?` ` Answer You are calling application = Flask(__name__) twice. So second time you are overwriting the first application. It
Airflow/EC2 – Save CSV from DAG
I was looking around but I could not find anyone that may have a similar issue. I’m trying to save some results to a CSV into my EC2 instance, but for some reason the return value is none. Here is what I have: I have to get this output in a CSV and therefore the use of Pandas. This is
Unable to apply Django migration in Postgres DB
In Django app, I’m using Postgres DB. I have two tables where one of them has 76 million records and the other 8.2 million. I have created a new migration file where in I’m adding a new column to a table in an app and setting default value to 0. My database is hosted on Ubuntu EC2 instance which has
aws boto3 grab subnet info
Im trying to grab a list of subnets from aws, I have a working version for VPC that I have modified: I keep getting: subnets = list(ec2.Subnet.filters(Filters=filters)) AttributeError: ‘function’ object has no attribute ‘filters’ From everything im reading and other examples this should work Any ideas? Answer To access the subnets collection of ec2 resource,
How to delete an AMI using boto?
(cross posted to boto-users) Given an image ID, how can I delete it using boto? Answer You use the deregister() API. There are a few ways of getting the image id (i.e. you can list all images and search their properties, etc) Here is a code fragment which will delete one of your existing AMIs (assuming it’s in the EU