aws_eventbridge_toggler
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Script that allows you to enable and disable AWS EventBridge rules
-
In AWS go to the IAM and create a new IAM user for Val Town
-
On the Set permissions page, choose the permissions you require. To get this Val up and running you can attach the
AmazonEventBridgeFullAccess
policy but it's recommended to limit your permissions.The following policy allows for reading and toggling any EventBridge rule:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "events:DescribeRule", "events:EnableRule", "events:DisableRule" ], "Resource": "*" } ] } -
Finally add your AWS region as well as yourAccess Key ID and Secret Access Key from your IAM user to Val Town's environment variables as
AWS_REGION
,AWS_ACCESS_KEY_ID
, andAWS_SECRET_ACCESS_KEY