Skip to content

Commit 39d47b2

Browse files
committed
minor: unify and adjust API GW stage name
1 parent 924e5e9 commit 39d47b2

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ usage: ## Show usage for this Makefile
55
deploy: ## 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+
811
web: ## 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"; \

bin/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ log "API endpoints set up successfully."
246246
log "Deploying API..."
247247
awslocal 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"
251251
log "API deployed. Endpoint: $API_ENDPOINT"
252252

253253
# SQS DLQ -> EventBridge Pipes -> SNS

bin/deploy_cdk.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ if [ ! -d frontend/build ]; then
1515
)
1616
fi
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
2025
npm run ${CDK_CMD} -- deploy --require-approval never QuizAppStack

bin/seed.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if [ -z "$API_ID" ]; then
2525
exit 1
2626
fi
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

3030
create_quiz() {
3131
local quiz_data=$1

0 commit comments

Comments
 (0)