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


10

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

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


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


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


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.


7

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

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.


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

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


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

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

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

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

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

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


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

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



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