ec2-api-tools

.htaccess not working in amazon ec2 ubuntu instance

限于喜欢 提交于 2019-12-03 16:00:28
I have a server from amazon's ec2 service running on Linux Ubuntu ( Ubuntu Server 13.04 64 bit) and I have installed apache, php, and mysql. I have added a .htaccess file in my document root (i.e /var/www/). Here is the code in .htaccess file as follows: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php If I remove .php from url like "index1" instead of "index1.php", it returns 404 browser error. It works properly in my previous server. I have .htaccess enabled in server. I did it using command "sudo vim /etc

How to pass environment variables when programmatically starting a new Amazon EC2 from image?

假装没事ソ 提交于 2019-12-03 04:17:35
问题 I am using AWS Java API RunInstance() to start a new EC2 instance from my custom AMI image. How do I pass environment variables to the new EC2 INSTANCE such as database url, AWS credentials etc. ? 回答1: http://alestic.com/2009/06/ec2-user-data-scripts explains how to do this with user-data. for gotchas about using Java see AmazonEC2 launch with userdata. note that I've seen mention that this doesn't work with Windows, only Unix. [update] more data on setting environment variables here: https:/

How to pass environment variables when programmatically starting a new Amazon EC2 from image?

拥有回忆 提交于 2019-12-02 17:35:51
I am using AWS Java API RunInstance() to start a new EC2 instance from my custom AMI image. How do I pass environment variables to the new EC2 INSTANCE such as database url, AWS credentials etc. ? jcomeau_ictx http://alestic.com/2009/06/ec2-user-data-scripts explains how to do this with user-data. for gotchas about using Java see AmazonEC2 launch with userdata . note that I've seen mention that this doesn't work with Windows, only Unix. [update] more data on setting environment variables here: https://forums.aws.amazon.com/message.jspa?messageID=139744 [after much testing] for me, echoing the

Error importing vmdk files using ec2 developer tools

纵饮孤独 提交于 2019-12-01 16:50:35
Although vmdk disk format is supported by ec2-import-instance tool, every time I try to run the command on a vmdk file, I get the following error: ERROR: File uses unsupported compression algorithm 0 I invoke the tool in the following format: ec2-import-instance -f vmdk -o <ACCESS KEY> -w <SECRET KEY> <VMDK file> I am using ec2 tools version 1.6.6.1. Looks like it's got nothing to do with "compression algorithm" but instead more to do with supported vmdk formats as documented in http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html ERROR: File uses unsupported

EC2 API Error validating access credential

99封情书 提交于 2019-11-29 22:52:46
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=XXXXXX export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre export EC2_HOME=/usr/local/ec2/ec2-api-tools-1.7.1.0 export PATH=$PATH:$EC2_HOME/bin Everythings looks configured as asked, but i can't connect to aws. Here the output of the command ec2-describe-regions in verbose mode: Client.AuthFailure: AWS was not able to validate the provided access credentials ubuntu@ip:~$ ec2dre -v Setting User-Agent to [ec2

EC2 API Error validating access credential

折月煮酒 提交于 2019-11-28 19:41:17
问题 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=XXXXXX export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre export EC2_HOME=/usr/local/ec2/ec2-api-tools-1.7.1.0 export PATH=$PATH:$EC2_HOME/bin Everythings looks configured as asked, but i can't connect to aws. Here the output of the command ec2-describe-regions in verbose mode: Client.AuthFailure: AWS was

How do I take a backup of aws ec2 instance/ephemeral storage?

牧云@^-^@ 提交于 2019-11-27 21:00:45
问题 I have my db kept at /mnt, using ephemeral storage that comes with ec2 instance. To take the backup using ec2 api tools we need a volume id, but in the aws console I can find the volume id of only the 8gb root storage. What should I do if want the backup of ephemeral storage? Is there any alternative for backing up instance storage? 回答1: First and foremost, you should never store anything of lasting value on ephemeral storage in Amazon EC2, except if you know exactly what you are doing and

Getting ID of an instance newly launched with ec2-api-tools

扶醉桌前 提交于 2019-11-27 13:50:23
问题 I'm launching an EC2 instance, by invoking ec2-run-instances from simple a bash script, and want to perform further operations on that instance (e.g. associate elastic IP), for which I need the instance id. The command is something like ec2-run-instances ami-dd8ea5a9 -K pk.pem -C cert.pem --region eu-west-1 -t c1.medium -n 1 , and its output: RESERVATION r-b6ea58c1 696664755663 default INSTANCE i-945af9e3 ami-dd8ea5b9 pending 0 c1.medium 2010-04-15T10:47:56+0000 eu-west-1a aki-b02a01c4 ari