Skip to content

Commit 9f19ffa

Browse files
committed
Add permissin from EventBridge
1 parent 4a06ca3 commit 9f19ffa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

deploy_scripts/deploy_lambda.py

+8
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ def deploy_lambda(lambda_function, code_dir):
4141
)
4242
waiter = client.get_waiter("function_exists")
4343
waiter.wait(FunctionName=lambda_function)
44+
if lambda_function == "XGBoostCICostWatcher":
45+
client.add_permission(
46+
FunctionName=lambda_function,
47+
StatementId="EventBridge",
48+
Action="lambda:InvokeFunction",
49+
Principal="events.amazonaws.com",
50+
SourceArn="arn:aws:events:us-west-2:492475357299:rule/XGBoostCICostWatcherInvoker",
51+
)
4452
print(f"Finished deploying to Lambda function {lambda_function}.")
4553

4654

0 commit comments

Comments
 (0)