Skip to content

Commit

Permalink
updated makefile - added add-permission call for events
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremycook123 committed Dec 4, 2023
1 parent b66be2f commit db33a77
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ deploy: release.zip
--schedule-expression 'rate(2 minutes)'
aws events put-targets \
--rule "${LAMBDA_NAME}" \
--targets "Id"="1","Arn"="arn:aws:lambda:us-west-2:4${AWS_ACCOUNT_ID}:function:${LAMBDA_NAME}"
--targets "Id"="1","Arn"="arn:aws:lambda:us-west-2:${AWS_ACCOUNT_ID}:function:${LAMBDA_NAME}"
aws lambda add-permission \
--function-name "${LAMBDA_NAME}" \
--statement-id "${LAMBDA_NAME}-events" \
--action 'lambda:InvokeFunction' \
--principal events.amazonaws.com \
--source-arn "arn:aws:events:us-west-2:${AWS_ACCOUNT_ID}:rule/${LAMBDA_NAME}"
@echo "lambda function is ready..."

.PHONY: update
Expand Down

0 comments on commit db33a77

Please sign in to comment.