Tag Info

Hot answers tagged

22

Yes, your understanding is correct. There's no AWS charging based on CPU usage -- you pay the same for an instance whether its CPU usage is 0% or 100%.


10

Update AWS has enabled this feature in the EC2 API. It is available as the --virtualization-type option to aws ec2 register-image in the new Boto based awscli. Original answer Yes! Unfortunately, there is not a direct way to do so. Also, some PV instances may need kernel and bootloader modifications. Create a volume from your existing PV AMI. If it was ...


10

AWS EC2 shows the SSH2 fingerprint, not the OpenSSH fingerprint everyone expects. It doesn't say this in the UI. It also shows two completely different kinds of fingerprints depending on whether the key was generated on AWS and downloaded, or whether you uploaded your own public key. Fingerprints generated with ssh-keygen -l -f id_rsa will not match ...


9

That long string in your access logs is URL encoded and decodes to this: -d allow_url_include=on -d safe_mode=off -d suhosin.simulation=on -d disable_functions="" -d open_basedir=none -d auto_prepend_file=php://input -d cgi.force_redirect=0 -d cgi.redirect_status_env=0 It looks to me like it's passing a bunch of options to php-cgi that turn off all the ...


9

I do see times where AWS Support folks will reply to someone in the forums with "Can you post your instance ID?" and then they'll reply back with things like "yep, I see your instance is off, etc."...so I'd presume that it isn't something that non-AWS tech support can take advantage of and use against you, or their support staff would ask for it via a ...


8

So, for a full answer, basically your SSD drives are ephemeral disks, and according to the AWS documentation the only way to use these ephemeral disk is to create a new instance. (The feature to attach ephemeral storage to the instance after it has been create it's not available yet) This is from the AWS docs: Instances that use Amazon EBS for the root ...


7

ClusterSSH, Capistrano, pconsole, and many other tools exist to execute commands across many Linux servers. In addition, you might look into configuration management tools like Puppet, Chef, SaltStack, or Ansible in terms of orchestrating your entire environment. Generally, the AWS command line interface is for interfacing with the product and services ...


7

You have an incompatible repository "rpmforge". This only works on RHEL and clones, and isn't compatible with Amazon Linux (which used to be a RHEL clone, but isn't anymore). You have a couple of options: Remove the rpmforge repository and try again. Note that you might not be able to do this if you actually need packages from this repository. The ...


7

The EC2 monitoring documentation suggests a method of doing this by installing the Monitoring Scripts for Amazon EC2 Instances and then configuring a cron job to gather the data and reprt back.


7

VPC does not make any difference in latency. The main thing you can consider if you need especially low latency is using placement groups. There are some limitations on which instance sizes support this, but if you use them, you are guaranteed very low-latency interconnects on the EC2 10Gbps network.


7

This is clearly a bug in the software computing the traffic rate. You need to show the image to the vendor of the software, which produced the graph. That's the only way, you are going to get an answer as to what happened. Probably some negative number showed up where a positive number was expected, and wrapped around to around 18EB. Use that erroneous ...


6

Yes, that's correct. You might also look at spot instances for load sharing as they're much cheaper than on-demand instances with the drawback that they can disappear at any time. As long as you can manage that, they're a good option.


6

Using a VPC will solve a lot of your problems, as private IP addresses will be static there. Amazon is strongly encouraging people to move to VPC for reasons like this. Once you have one, your two systems should be able to talk over the AWS-internal network. To answer your question about exposure along the aws-public <---> aws-public route, it is ...


6

You want to setup NTP. See: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html Extra content here.


5

Look for the metadata by the EC2 internal domain name instead of IP, which will return a fast DNS failure if you're not on EC2, and avoids IP conflicts or routing issues: curl -s http://instance-data.ec2.internal && echo "EC2 instance!" || echo "Non EC2 instance!" On some distros, very basic systems, or very early at installion stages curl is not ...


5

Update Mike Pope has published a nice article about Granting Permission to Launch EC2 Instances with IAM Roles (PassRole Permission) on the AWS Security Blog, which explains the subject matter from an AWS point of view. Initial Answer Skaperen's answer is partially correct (+1), but slightly imprecise/misleading as follows (the explanation seems a bit ...


5

Sounds like you need to load the Private key into PuTTY. Private keys are purely a client-side, and application-specific thing - the keys are not transferred to the server at any point, as you eluded to in your above comment. Each SSH client needs to know where to look for your private key, so it can be used in the authentication process. You should know ...


5

Your issue may actually be down to "CPU steal" which happens across Amazon's stack (and as a matter of fact, any virtualised infrastructure). You can read more about CPU steal here. Essentially, your VM is idle and Amazon is "borrowing" some of your CPU cycles to give to someone else who needs it - this is standard practice for a virtualised environment ...


5

From the AWS Developer Forum post on this topic: Try stopping the broken instance, detaching the EBS volume, and attaching it as a secondary volume to another instance. Once you've mounted the broken volume somewhere on the other instance, check the /etc/sshd_config file (near the bottom). I had a few RHEL instances where Yum scrogged the ...


5

There is no DNS cache unless you have installed and configured nscd or a caching name server.


5

DNS. It is a CNAME to be exact. Stupid 30 character requirement


5

It should be: ec2-54-208-90-77.compute-1.amazonaws.com ...which resolves correctly. Additionally, that record is not a CNAME. It's an A record. ~ dig ec2-54-208-90-77.compute-1.amazonaws.com ; <<>> DiG 9.8.3-P1 <<>> ec2-54-208-90-77.compute-1.amazonaws.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- ...


5

There are a couple approaches to consider for how to terminate an instance from itself: Start the EC2 instance with the instance-initiated-shutdown-behavior set to "terminate", then "sudo halt" or equivalent from inside the instance. Start the EC2 instance with an IAM role that allows it to terminate itself, then invoke the ec2 terminate-instances API from ...


5

If you are trying to mange crontabs programmatically, just create a file in /etc/cron.d/ for example, /etc/cron.d/example-cron, and populate it with the aforementioned lines: @daily ubuntu /home/ubuntu/db-backup-to-s3-daily.sh @hourly ubuntu /home/ubuntu/db-backup-to-s3-hourly.sh The only difference is that you have to include a user to run the cron as, ...


5

If your VPC EC2 instances are in private subnets, then to access EC2-Classic, your VPC will need a NAT. Give your NAT an elastic IP address so it's a constant public IP address. Then in your RDS security group, allow access only for that Elastic IP address. If your VPC EC2 instances are in public subnets, then you could give each of them elastic IP ...


5

Provide your script via "user-data" during your launch process and it will be executed upon first boot. If you're using awscli, use the --user-data option" $ aws ec2 run-instances --image-id ami-xxxxxxxx --count 1 --instance-type m1.small --key-name foo-key --security-group-ids sg-xxxxxxxx --subnet-id subnet-xxxxxxxx --placement AvailabilityZone=us-west-2a ...


5

No, t1.micro uses PV instances. Use t2.micro for an HVM instance.


5

Most Linuxes these days should perform a forced fsck at boot time when the file /forcefsck is present on the system. If you are at liberty to reboot the VM, run touch /forcefsck Then reboot at your convenience


4

We run Linux ec2 instances from small to extra large and I just did a check to make sure they were in sync. All servers were running the ntp daemon connecting to amazon specific pools. server 0.amazon.pool.ntp.org iburst server 1.amazon.pool.ntp.org iburst server 2.amazon.pool.ntp.org iburst server 3.amazon.pool.ntp.org iburst This may not have been the ...


4

Try the following link. Add a config file in your root inside .ebextensions directory. Then add this. files: "/etc/httpd/conf.d/vhost.conf": mode: "000644" owner: root group: root encoding: plain content: | NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/var/app/current/" <Directory ...



Only top voted, non community-wiki answers of a minimum length are eligible