Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the name of the Lambda deployment package to always be `carbon.zip`. We don't currently have the infrastructure to handle changing Lambda aliases so we'll just overwrite the existing Lambda and let the two week delay in staging/prod cron schedules highlight any issues. Downgrading the Lambda to an older version can be done manually using the deployment instructions in the README.
- Loading branch information
Mike Graves
committed
Sep 5, 2018
1 parent
73637ad
commit 015f248
Showing
3 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
PACKAGE=carbon-`git rev-parse --short HEAD`.zip | ||
PACKAGE=carbon.zip | ||
S3_BUCKET=carbon-deploy | ||
|
||
aws lambda update-function-code --function-name carbon-test --s3-bucket \ | ||
$S3_BUCKET --s3-key $PACKAGE --region us-east-1 | ||
for arg in $@; do | ||
if [ "$arg" = '--upload' ]; then | ||
aws s3 cp "dist-aws/$PACKAGE" "s3://$S3_BUCKET/$PACKAGE" | ||
break | ||
fi | ||
done | ||
|
||
aws lambda update-function-code --function-name mitlib-global-carbon \ | ||
--s3-bucket $S3_BUCKET --s3-key $PACKAGE --region us-east-1 |