To deploy you will first need to have your AWS credentials configured.
You will need:
- An AWS account (this is separate from your normal Amazon account)
- You will probably want to create one for the AWS Console.
- Access to the administrator account on LastPass or the help of someone that does have these credentials.
- To create
~/.aws/config
. It should look like:
[profile dev]
aws_access_key_id = AKIA...
aws_secret_access_key = ...
[profile prod]
aws_access_key_id = AKIA...
aws_secret_access_key = ...
[default]
region = us-west-2
You can use the same key for both the dev
and prod
sections.
- You will to create
~/.aws/credentials
. It should look like:
[default]
aws_access_key_id = AKIA...
aws_secret_access_key = ...
These keys should also be the same as above.
Once you have your credentials deploying to dev is pretty simple:
$ ./deploy dev
Deploying to production is trickier. First you will need to do the actual deploy:
$ ./deploy prod
Then you will need to use the Cloudfront Console to create an "invalidation" to clear the cache. Otherwise you will have to wait for the cache to expire. (Which is 24 hours by default.)
To create the invalidation:
- Log into the Cloudfront Console.
- Use the it@adadevelopersacademy.org credentials from LastPass.
- Click into the "Distribution" for apply.adadev.org (E1YKMRTO9G7F1G)
- Click into the "Invalidations" tab.
- Click "Create Invalidation" and put in
/
as the object path. - Repeat steps 2 through 4 for application.adadevelopersacademy.org (E2R1BVOWQFA8RO)