Created
June 10, 2020 16:22
-
-
Save teknogeek0/0bbb90117df76d5d154cdeaa8b5c6d86 to your computer and use it in GitHub Desktop.
correct broken file from Monday
This file contains hidden or 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
ec2-user: $ cd ~/environment/theme-park-backend/1-app-deploy/sam-app | |
Below is the line that is changed. | |
ec2-user:~/environment/theme-park-backend (master) $ git diff | |
diff --git a/1-app-deploy/sam-app/getUploadURL/app.js b/1-app-deploy/sam-app/getUploadURL/app.js | |
index 7a41827..d6f6834 100644 | |
--- a/1-app-deploy/sam-app/getUploadURL/app.js | |
+++ b/1-app-deploy/sam-app/getUploadURL/app.js | |
@@ -15,7 +15,7 @@ | |
'use strict' | |
-const uuidv4 = require('uuid/v4') | |
+const { v4: uuidv4 } = require('uuid') | |
const AWS = require('aws-sdk') | |
AWS.config.update({ region: process.env.AWS_REGION }) | |
const s3 = new AWS.S3() | |
+++++++++++++++++++++++++++++++++++++++++++++ | |
Now in that same directory: | |
sam build | |
accountId=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .accountId) | |
s3_deploy_bucket="theme-park-sam-deploys-${accountId}" | |
echo $s3_deploy_bucket | |
sam package --output-template-file packaged.yaml --s3-bucket $s3_deploy_bucket | |
sam deploy --template-file packaged.yaml --stack-name theme-park-backend --capabilities CAPABILITY_IAM | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment