This is a cookbook of how to Get Common Things Done with awsbox.
If you use awsbox from an existing project, a git "remote" will be added for you with the name of the machine you chose (with the -n flag).
You can SSH as the user that runs your app:
$ ssh app@[ip address]
Or as an admin user with sudo privileges
$ ssh ec2-user@[ip address]
$ ssh app@[ip address] 'tail -F var/log/*'
$ ssh app@[ip address] 'forever restartall'
Add their key to ~ec2-user/.ssh/authorized_keys
to give access to
administer the machine and the app.
Alternately, to only give app access, turn the symlink in
~app/.ssh/authorized_keys
to a real file, and add your buddy's key
there:
$ cp -L ~/.ssh/authorized_keys ~/.ssh/foo && mv .ssh/foo .ssh/authorized_keys
$ # now add the key
SSL is already enabled with a self signed SSL certificate. You can update the SSL credentials thusly:
$ scp myprivatekey.pem proxy@[ip address]:key.pem
$ scp mycert.pem proxy@[ip address]:cert.pem
$ ssh proxy@[ip address] 'forever restartall'
At creation time you can pass --ssl=disable
to create the instance with SSL
disabled.
Post creation, you can SSH in as the proxy user, and update config.json to contain:
{ "ssl": "disable" }
Then restart the proxy with forever restartall
.
You can always use HTTP headers (Strict-Transport-Security), but even then, a user's first request will not be encrypted. To cause all HTTP traffic to be redirected to HTTPS, you can SSH in as the proxy user and update config.json to contain:
{ "ssl": "force" }
Then restart the proxy with forever restartall
.
Because we use http-proxy for HTTP forwarding, it should Just Work. Have a look at the socket.io example for a tiny focused example which uses WebSockets via the excellent socket.io library.
Use yum.
$ ssh ec2-user@[ip address]
$ yum search memcached
$ yum install memcached.x86_64