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%.


19

You can't use sudo to affect output redirection; > and >> are effected with the privilege of the calling user, because redirection is done by the calling shell, not the called subprocess. Either do cp /etc/sysctl.conf /tmp/ echo "net.ipv4.ip_forward = 1" >> /tmp/sysctl.conf sudo cp /tmp/sysctl.conf /etc/ or sudo /bin/su -c "echo ...


9

This is what a VPC is for. You can isolate your instance on its own subnet and the only way to access it would be its internal IP address. Read about it here: http://aws.amazon.com/vpc/


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

sudo runs only your command, not the redirect, as root. You'll need to wrap it all in a command where the whole thing runs as root: sudo sh -c 'echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf'


7

You might find it simpler to use this command: echo net.ipv4.ip_forward = 1 | sudo tee -a /etc/sysctl.conf


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

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

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.


6

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 ...


6

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.


6

If all else fails, there's the old fashioned way - use dpkg --get-selections to dump out a list of installed packages, and install them with dpkg --set-selections. Create the same users as the source system if necessary - cat /etc/passwd should list them out, and you can check with diff to see if the two lists are identical. Then use rsync to duplicate ...


6

I'm not sure about shared AMIs, but many things in EC2 are segmented by region and you have to select the correct region to see them. You can select the region in the upper right-hand corner of the screen.


6

If you want to store the settings in the knife.rb file: knife[:aws_ssh_key_id] = 'pemfilename' pemfilename should be the pem file name without the .pem extension and it has to be located in: ~/.ssh/ Also, it has to be chmodded 600: (chmod 600 ~/.ssh/pemfile.pem) So if your pem file is ~/.ssh/mypem.pem you need to set: knife[:aws_ssh_key_id] = 'mypem' ...


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.


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

Without buying a domain name it will not be possible for you to get rid of the amazon long Public Name. You cannot do aliasing to wordpress.com domain , even for that you require your own domain name.


5

As a one-off, I'd suggest using the AWS VMimport feature, which also allows you to export (some) EC2 virtual machines. More information on that can be found here: http://aws.amazon.com/ec2/vmimport/ If this turns out not to be feasible for you and if your EC2 instance is EBS-based, you can also try the following: Stop your EC2 instance, and detach the ...


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

I found this question while Googling for how to diagnose Amazon Elastic Load Balancers (ELBs) and I want to answer it for anyone else like me who has had this trouble without much guidance. ELB Properties ELBs have some interesting properties. For instance: ELBs are made up of 1 or more nodes These nodes are published as A records for the ELB name These ...


5

It is now possible to do this. Click on the actions menu and Change Security Groups - Select the Security Groups you would like to use.


5

My first move would be trying a much larger instance. m1.mediums have "moderate" network performance. http://aws.amazon.com/ec2/instance-types/#instance-details Something like the hi1.4xlarge would give you a 10 gigabit connection to AWS's network. If testing with one doesn't show better performance, the bottleneck isn't AWS.


5

Q. If my spot instance is automatically terminated due to my max bid being exceeded, is it a clean shutdown -- as if a user clicked Start>>Shutdown ? Or is it a hard shutdown -- as if someone just yanked out the power cord? It might be a clean shutdown, but it also might be a hard shutdown. Amazon's wording implies they try to make it clean but ...


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

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

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

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


4

Regardless of what it has as instance storage, it'll boot off an EBS drive. You can mount the SSD as an additional drive - this can be handy for swap space, temporary files, caches, etc.



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