Getting Drupal Running on Amazon EC2

This is for me. This could also be for you. That’s why I’m posting it.

I needed to get a fully functioning Drupal installation running on a Free Amazon EC2 cloud instance. I had to pull in multiple websites in order to do it. Interspersed are some bits of wisdom that I needed to know in order to get things like “Module Install” to work.

Getting it up and running

Using Putty to SSH on Windows?

Access your server through ssh:

ssh ec2-user@IP -i keyname.pem

did you email yourself the key?

chmod 400 keyname.pem

Setting up SFTP access

sudo su -
chown -R ec2-user /var/www/html
chmod -R 755 /var/www/html

Using Filezilla for SFTP?

chown -R apache:apache /var/www/html/sites (allows drupal to install modules without FTP installed)

Updating Drupal:

drush up

Nice optimizations

Own your files on EC2

chown -R apache:apache /var/www/html/sites/default/files
chown -R apache:apache /var/www/html/sites/all
Written on October 3, 2013