fix(gws.fyi): Explicitly specify personal profile to AWS

Explicitly pass --profile personal to AWS commands, to avoid deploying
this to the wrong aws account on accident

Change-Id: Iff8236967adcfdedfbace8930031db9adf60e3d1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2699
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Griffin Smith 2021-03-28 19:53:44 -04:00 committed by glittershark
parent 70a8c44a07
commit 3678a33327
2 changed files with 3 additions and 2 deletions

View file

@ -16,6 +16,7 @@ renew:
--config-dir $(shell pwd)/letsencrypt/config
@echo "Reimporting certificate"
@aws acm import-certificate \
--profile personal \
--certificate file://letsencrypt/config/live/www.gws.fyi/cert.pem \
--certificate-chain file://letsencrypt/config/live/www.gws.fyi/fullchain.pem \
--private-key file://letsencrypt/config/live/www.gws.fyi/privkey.pem \

View file

@ -21,8 +21,8 @@ let
'';
in writeShellScript "deploy.sh" ''
${awscli}/bin/aws s3 sync ${website}/ ${bucket}
${awscli}/bin/aws cloudfront create-invalidation \
${awscli}/bin/aws --profile personal s3 sync ${website}/ ${bucket}
${awscli}/bin/aws --profile personal cloudfront create-invalidation \
--distribution-id "${distributionID}" \
--paths "/*"
echo "Deployed to http://gws.fyi"