112 questions
0
votes
0
answers
34
views
EC2 Instance Cannot Connect to Local TWS via Public IP and Port Forwarding
I’m trying to connect an AWS EC2 instance to my local TWS (Trader Workstation) running on a MacBook via my public IP on port 7497. The TWS is correctly configured to allow API connections, and I’ve ...
0
votes
1
answer
609
views
How do I launch multiple EC2 instances to run a program with different parameters
I am running a program which takes in certain parameters. Because the program will run for a long time, I am thinking to launch multiple EC2 instances such that I can run this program with different ...
0
votes
0
answers
192
views
"Unable to open a display" while rendering in AWS ec2 instance
I am unable to figure out where I am wrong while rendering in ec2 instance
Ubuntu 22.04.1 LTS (Jammy Jellyfish)
p2.xlarge
x86_64
I have followed every single step in https://fajrulf.medium.com/how-to-...
-1
votes
1
answer
2k
views
EC2 Instance is setting Access-Control-Allow-Origin: * for all responses
So I want a same-origin policy which only allows my API to be called from the same-origin in browser, I don't want CORs.
After hours testing whether nginx or my node web app was setting Access-Control-...
0
votes
1
answer
491
views
AWS EC2 API CLI tools vs EC2 Command line tool CLI which one is latest
In my Linux Ubuntu box, I have two variants for tools installed for AWS EC2.
AWS CLI v2 installed @ /usr/local/aws-cli/2.4.0
These provide the unified AWS CLI interface that everyone is used to aws ...
2
votes
2
answers
775
views
Find the terminated EC2 instances count
Is there a way to find the number of EC2 instances which were launched in last 1/2/3/4/5 or 6 months in all regions? (running and terminated).
From a similar question as below, I can only get the ...
0
votes
1
answer
145
views
How to allow web hosting in EC2 with Linux AMI (port 80 rule added)
I've added rules for port 80 for http and even 443 for https but the url returns this site can't be reached. Do I need to configure the firewall somehow?
Also for url I used the public DNS address, ...
0
votes
1
answer
2k
views
unable to Retrieve Default Windows Administrator Password of EC2 instance
When I am trying to retrieve password for one EC2 instance from key pair, I am getting the below error, please help me how to retrieve the password.
Password is not available.
This instance was ...
1
vote
0
answers
525
views
Assign IP address to spot instance automatically
"Spot Requests" has a really useful option called "Maintain target capacity".
With this, I am sure that the server will be always there. But there is no way to automatically assign an IP address to ...
1
vote
0
answers
204
views
How to get dynamic cost of an AWS instance?
I am working to get the cost of an EC2 instance attached with EBS volumes of different sizes,
For this, I am currently getting the values from AWS calculator, but every time the values will change, ...
2
votes
1
answer
480
views
AWS IAM Policy to restrict Read Acces on EC2 instances
I'm trying to create a AWS IAM policy to restrict the read access on EC2 instances.
Goal: I have many EC2 instances and many different users in AWS and I want to have a group of users who are able to ...
2
votes
2
answers
1k
views
EBS Volume attach to running EC2 Windows instance
I am having a scenario where EC2 mount two EBS Volumes and one of them is root. My ELB is setup to size=1 instance actively running. I want to have second EBS volume snapshot to be attached to new EC2 ...
4
votes
1
answer
2k
views
REST API - AWS EC2 Pricing Per Hour
I want to programatically retrieve a list of prices for given instance IDs for AWS EC2 instances.
I'm trying to do this via plain REST API calls (ie. without a framework).
I want to provide a list of ...
0
votes
2
answers
667
views
AmazonEC2Client describeInstances() returns zero Reservations in Java
While running "aws ec2 describe-instances" in command line, It gives list of all ec2 Instances but with Java AWS-SDK it's gives zero Reservations. Please see below code snippet,
AmazonEC2 ec2;
if (...
3
votes
0
answers
309
views
What happened to ec2-api-tools? Is there an easy way to migrate dependant scripts
So I have a load of scripts which use ec2-api-tools. Our infosec people have identified an issue in one of the included libraries, that comes with it. So I've gone on the hunt for a current updated ...
1
vote
1
answer
480
views
How do I access the AWS PHP SDK on EC2?
I have gotten to know that the AWS SDK comes with the default operating system installed on AWS EC2 when provisioned via Elastic Beanstalk.
I would like to know if I can access the PHP version of the ...
0
votes
2
answers
283
views
What's the best method for creating a scheduler for running EC2 instances?
I want to create a web app for my organization where users can schedule in advance at what times they'd like their EC2 instances to start and stop (like creating events in a calendar), and those ...
1
vote
2
answers
5k
views
Amazon EC2 - how to get list of process running on instances via AWS API?
How to get a list of process running on Amazon EC2 instances via the AWS API?
4
votes
1
answer
5k
views
AWS ec2 import-instance error-No valid partitions. Not a valid volume.[Client error]
I am trying to import a SO VMDK file(OVA/OVF) of Ubuntu server 14.04 to AWS ,But facing the below error
,
even though the machine seems to have proper partitioning and volumes
.
This happens only ...
0
votes
0
answers
203
views
Getting a python error when running the EB command
I installed ec2 api tools and when I run the command I get this error:
Traceback (most recent call last):
File "/usr/local/bin/eb", line 9, in <module>
load_entry_point('awsebcli==3.9.0', ...
0
votes
0
answers
826
views
AWS access key file error - Required option '-O, --aws-access-key KEY' missing (-h for usage)
I am trying to execute a bash script to fetch the ec2 cost details from aws. while executing the script i get the following eror
Required option '-O, --aws-access-key KEY' missing (-h for usage)
I ...
0
votes
2
answers
639
views
How can I start an instance from the new EC2 CLI?
I have an ec2 micro instance. I can start it from the console, ssh into it (using a .pem file) and visit the website it hosts.
Using the old ec2 CLI, I can start the instance and perform other ...
0
votes
2
answers
4k
views
Boto: how to get security group by id?
I`m trying to get the security group by group id.
Here is the code:
#!/usr/bin/env python2.7
import boto.ec2
import argparse
parser = argparse.ArgumentParser(description="")
parser.add_argument('...
0
votes
1
answer
118
views
ec2-automate-backup purge not working
We are running this script below and this doesnt delete anything older than one day what are we missing ?
We got the script from github.com/colinbjohnson/aws-missing-tools/tree/master/ec2-automate-...
11
votes
1
answer
5k
views
AWS CLI filter OR logic
I am trying to retrieve a list of servers using the AWS CLI tools.
I have 2 groups of servers, 1 will have the string "mind" in the Name tag, another group will have the string "intelligence" in the ...
2
votes
1
answer
1k
views
ec2-automate-backup error in describe volumes
I'm getting an error when trying to run ec2-automate-backup-awscli.sh. I saw https://github.com/colinbjohnson/aws-missing-tools/issues/88 which described a similar issue, but I'm using the cron-primer....
0
votes
1
answer
155
views
Saltstack: (boto_secgroup) Add a rule that allows ALL TRAFFIC to a sec group
[using salt --version: 2015.5.0] I want to add a rule that allows ALL TRAFFIC from another security group
I have this in my pillar:
securitygroups:
groups:
- name: NFS
region: ...
0
votes
0
answers
23
views
Assign domain name through CLI - AWS [duplicate]
By EC2-API tools we can create new instance and assign an elastic ip to it through command line interface.
Is there any method to register a domain and map it with the elastic ip of the newly created ...
0
votes
1
answer
190
views
Any way for EC2 instance to discover which region it is in? [duplicate]
I want to write a script which uses the AWS api within an EC2 instance to modify its own configuration, however to use the aws command I need to provide a AWS_DEFAULT_REGION environment variable with ...
0
votes
1
answer
166
views
Redirect objShell.run with comspec and multiple arguments into a file when describing ec2 instances in vbscript
I've been struggling with this issue for some time now and it seems nobody on forums or google posted something like this, so I'll try to get some help here.
I'm describing ec2 instances using vbs ...
0
votes
1
answer
630
views
ec2-describe-instances does not return a response
I am working with an application that uses EC2 CLI.
I have a running instance in us-east-1 region.
When I run
ec2-describe-instances --region us-east-1
it does not return anything.
However,
aws ...
0
votes
1
answer
66
views
Why the EC2 instance is not able to access the RDS instance, if we set publicly access to 'No' with default VPC and Security group?
Not able access the RDS instance from the EC2 instance, if we set the publicly access to 'No'. As per my understanding the EC2 instance should be accessible within the network and should be blocked ...
1
vote
1
answer
625
views
Integration of Google Calendar with amazon EC2
I am using Google calendar and based on calendar booking i want to start AWS EC2 instances.
Is there a way to achieve this interaction?
0
votes
2
answers
198
views
When purchasing a reserved instance it means there will always be an instance for me?
I am a little bit confused with the way EC2 pricing works with reserved instances. It is my understanding that EC2 reserved instances are just a way to price instances.
For my application I need to ...
0
votes
2
answers
610
views
Complete control of EC2 instances from python
I am new to EC2 and I am trying to find a way to get started easily. I have searched internet for tutorials, however I am unable to find a precise answer to my question.
I am trying to use amazon EC2 ...
0
votes
1
answer
1k
views
userdata ruby script to run on instance startup uses wrong ruby version
I have an instance that I would like to run a user script when it starts. So I put this code in the userdata:
Content-Type: multipart/mixed; boundary="===============zCWTbYbXsHmnlc1kxsQr93CA=="
MIME-...
4
votes
4
answers
4k
views
Choose a Free tier Amazon Machine Image (AMI) using EC2 command line tools
Is there any way to query for free tier AMI ID's using EC2 CLI tools?
3
votes
1
answer
982
views
Query EC2 instance type attributes
Is there a way to get the number of cores and amount of memory of an instance type from the command line aws tool?
Basically I want to access the data on http://aws.amazon.com/ec2/instance-types/ ...
1
vote
1
answer
73
views
Deleting EC2 Instance Causes Amazon to Magically Restart New One
I have an Amazon AWS account with several instances. One of these instances I thought I deleted. However, I just checked my dashboard and it's still there. When I go to the dashboard and successfully ...
0
votes
1
answer
39
views
Can I use same signing certificate with knife ec2 that I use with ec2-api-tools
I have created a self-signed certificate and added it as 'signing certificate' on my AWS account. It works with ec2-api-tools with no problem.
Can I use it with the knife-ec2 plugin as well? How?
If ...
0
votes
1
answer
102
views
AWS start instance from cmd line specifying args to launch script
I need to be able to startup AWS EC2 instances quickly from one of my AMI images and at launch run a script to bootstrap the instance. I know I can do this with user data but I need to be able to pass ...
0
votes
1
answer
622
views
AWS API Tools vs AWS CLI: ec2-import-instance
I'm wondering... in the "new" AWS CLI tool, which would be the equivalent to the "old" ec2-import-instance command? Can't find anything useful in the AWS Docs, help output or on the web.
Reason why I'...
1
vote
1
answer
95
views
EC2 hourly usage alarm
I couldn't find a CloudWatch metric that was based on instance running time.
Are there any readily available controls for AWS EC2 that could for example send me an email if an instance of type C3....
0
votes
1
answer
1k
views
Not able to get instance-id from powershell in EC2 windows machin
I can able to get the instance-id from AWS EC2 windows machine's IE browser using the URL http://169.254.169.254/latest/meta-data/instance-id
In the same machine when I use Powershell command
Invoke-...
0
votes
1
answer
140
views
Not able to SSH to new command line created instance
I'm creating a new instance by using the following command,
ec2-run-instances --key "xxxx keypair" --instance-type t1.micro --instance-initiated-shutdown-behavior terminate --user-data-file ...
1
vote
1
answer
3k
views
AWS Instance creation error
i am getting the below error while creating an instance in AWS through eclipse.
exception in thread "main" com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the ...
3
votes
1
answer
2k
views
unable to parse the JSON returned by AWS.EC2.describeInstances() method in nodejs API
This is my code
var AWS = require('aws-sdk');
AWS.config.region = 'ap-southeast-1';
var uuid = require('node-uuid');
ec2 = new AWS.EC2({apiVersion: 'latest'});
AWS.config.update({accessKeyId: ...
43
votes
7
answers
43k
views
EC2 API Error validating access credential
I installed the ec2 api following the amazon guide. I setted up the access id and secret as environment variable.
Here it is my profile:
export AWS_ACCESS_KEY=XXXXX
export AWS_SECRET_KEY=...
0
votes
1
answer
62
views
Error: Signature matches only once in EC2 API request
I will show you my signing request.
https://ec2.eu-west-1.amazonaws.com?AWSAccessKeyId=THISISFAKEIDD
&Action=AuthorizeSecurityGroupIngress
&GroupId=sg-blahblah
&IpPermissions.1.FromPort=...
1
vote
1
answer
913
views
AWS new generation (m3.x) Intstance configuration not suppported
I am using java sdk to create ec2 instances.
Till now I was using m1.medium, m1.large, m1.xlarge configuration to create ec2 instance and it was successfully creating the ec2 instance.
But when i ...