If you want to set up a replication between an RDS and an existing mysql server environment, you might encounter privilege errors, when trying to execute commands like "change master to…" or "stop slave;" on the RDS. Amazon RDS comes with a bunch of stored procedures that you have to use instead: MySQL Command Stored Procedure […]
First install needed packages: apt-get install python-pip python-yaml unattended-upgrades These packages are needed to build the AWS package: pip install pystache pip install argparse pip install python-daemon Now get the latest scripts from here: wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz And install it: tar -xvpf aws-cfn-bootstrap-latest.tar.gz cd aws-cfn-bootstrap-1.4/ python setup.py build python setup.py install When the installation has finished successfully […]
When using a userdata script in you Autoscaling launch configuration, by default if your script has some output, it will not be visible somewhere. With this simple script you can redirect the outpout to a log file: #!/bin/bash -ex source /etc/profile exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 echo BEGIN #Your code comes […]
For EXT4 partitions: resize2fs /dev/xvda1 For XFS: xfs_growfs -d /dev/xvda1 Replace xvda1 with the partition of your choice! I ran into this problem using AWS instances in which I had to increase the size of the root partitions of an EBS volume. Type df -h to show your currently mounted partitions and disk usage.
For the following script you need to have installed Python >= 2.6 and Boto: apt-get install -y python-boto Next create a file ~/.boto containing the following lines: [Credentials] region = us-east-1 aws_access_key_id = YOUR_ACCESS_KEY_ID aws_secret_access_key = YOUR_SECRET_ACCCESS_KEY Put in the AWS credentials to access your bucket Then create the script, replace NAME_OF_YOU_BUCKET with your actual […]
rsync -rave "ssh -i your_aws_key.pem" /path/to/local/files ec2-user@EC2_INSTANCE:/path/to/remote/files r: recursivea: archivev: verbosee: remote shell command (ssh -i…) If you just want to synchronize an existing folder, you might want to try the update flag (-u).
First install Duplicity with its dependancies: apt-get install haveged python-paramiko python-boto python-gobject-2 duplicity Then generate a gpg key: gpg −−gen-key The output might be like this (just confirm everything with return and keep aside the password you'll have to enter): gpg (GnuPG) 1.4.12; Copyright (C) 2012 Free Software Foundation, Inc. This is free software: you […]
s3ql is an alternative to s3fs and s3backer which you can use to mount and s3 bucket into your local filesystem. s3ql will create a block device inside your S3 bucket. Its size is dynamic, so you allocate just as much storage space as you are using. It also encrypts your data using a password […]
First install the Python package: apt-get install python python-pip Then issue the AWS CLI Installation: pip install awscli If all went ok, you should be able to execute for example aws configure which will help you to create an initial configuration file containing your credentials, region and output format. More help type aws help or aws ec2 […]
Access your S3 Bucket just like a folder on your filesystem using s3fs! On Debian Squeeze you need to install the following packages: apt-get install make gcc g++ build-essential gettext libcurl3 libcurl3-dev libxml2 libxml2-utils libxml2-dev libcrypto++-dev libcrypto++-utils libcrypto++8 libfuse-dev libfuse2 libfuse-perl libfusefs-ruby For Debian Wheezy: apt-get install make gcc g++ build-essential gettext libcurl3 libcurl3-dev libxml2 libxml2-utils libxml2-dev libcrypto* libfuse* […]