Skip to content
Advertisement

Tag: amazon-ec2

AWS ElasticBeanstalk LoadBalancer Config Not Linking my aplication to my domain

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.

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

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

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

Advertisement