Skip to content

Commit

Permalink
Add aws commands to infra Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikuoja committed Jan 24, 2024
1 parent 27fa7b0 commit d85dd6c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions infra/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

build:
make build-lambda -C ..

update-lambda: update-db-manager
echo "All updated"

update-db-manager:
aws lambda update-function-code --function-name $(prefix)-db_manager --zip-file fileb://../database/db_manager.zip

log-db-manager:
aws logs tail "/aws/lambda/$(prefix)-db_manager"

## Commands to invoke lambda functions
create-db:
aws lambda invoke --cli-binary-format raw-in-base64-out --function-name $(prefix)-db_manager --payload '{"event_type": 1}' response_db.json

change-db-pw:
aws lambda invoke --cli-binary-format raw-in-base64-out --function-name $(prefix)-db_manager --payload '{"event_type": 2}' response_db.json

migrate-db:
aws lambda invoke --cli-binary-format raw-in-base64-out --function-name $(prefix)-db_manager --payload '{"event_type": 3}' response_db.json

0 comments on commit d85dd6c

Please sign in to comment.