File tree Expand file tree Collapse file tree 5 files changed +12
-4
lines changed
Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ usage: ## Show usage for this Makefile
55deploy : # # Deploy the application to LocalStack
66 bin/deploy.sh
77
8+ deploy-cdk : # # Deploy the application to LocalStack via CDK
9+ AWS_CMD=awslocal CDK_CMD=cdklocal bin/deploy_cdk.sh
10+
811web : # # Open the Web app in the browser (after the app is deployed)
912 DOMAIN_NAME=$$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].DomainName' ) ; \
1013 echo " CloudFront URL: https://$$ DOMAIN_NAME" ; \
Original file line number Diff line number Diff line change @@ -246,8 +246,8 @@ log "API endpoints set up successfully."
246246log " Deploying API..."
247247awslocal apigateway create-deployment \
248248 --rest-api-id $API_ID \
249- --stage-name test > /dev/null
250- API_ENDPOINT=" http://localhost:4566/_aws/execute-api/$API_ID /test "
249+ --stage-name prod > /dev/null
250+ API_ENDPOINT=" http://localhost:4566/_aws/execute-api/$API_ID /prod "
251251log " API deployed. Endpoint: $API_ENDPOINT "
252252
253253# SQS DLQ -> EventBridge Pipes -> SNS
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ if [ ! -d frontend/build ]; then
1515 )
1616fi
1717
18+ # bootstrap the stack
19+ (cd cdk
20+ npm run ${CDK_CMD} bootstrap
21+ )
22+
1823# deploy bulk of the application
1924(cd cdk
2025npm run ${CDK_CMD} -- deploy --require-approval never QuizAppStack
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ if [ -z "$API_ID" ]; then
2525 exit 1
2626fi
2727
28- API_ENDPOINT=" $AWS_ENDPOINT_URL /_aws/execute-api/$API_ID /test "
28+ API_ENDPOINT=" $AWS_ENDPOINT_URL /_aws/execute-api/$API_ID /prod "
2929
3030create_quiz () {
3131 local quiz_data=$1
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def api_endpoint():
1919 raise Exception (f"API { API_NAME } not found." )
2020
2121 API_ID = api ['id' ]
22- API_ENDPOINT = f"http://localhost:4566/_aws/execute-api/{ API_ID } /test "
22+ API_ENDPOINT = f"http://localhost:4566/_aws/execute-api/{ API_ID } /prod "
2323
2424 print (f"API Endpoint: { API_ENDPOINT } " )
2525
You can’t perform that action at this time.
0 commit comments