Exports an async function that creates a CloudWatchEventRule for our post Lambdas. The rule is to execute the Lambdas once every minute. What the post queue Lambdas do is pull tokens of the SQS queue in a predetermined loop. Between that looping logic, and the once a minute execution rule set here, we achieve the rate the user wants.
(require("deployCloudwatchEvent"))(region, postLambdaArn, cronJobName) → {String}
Exports deployCloudwatchEvent
Parameters:
Name | Type | Description |
---|---|---|
region |
String | A constant destructured from the CLI user's answers in |
postLambdaArn |
String | A Amazon Resource Number referring to the post queue Lambda we need to put this cloudwatch rule on. |
cronJobName |
String | Initialized in |
Returns:
Returns a Amazon Resource Number identifying this rule we just created.
- Type
- String
Methods
(async, inner) createCloudWatchEventRule(cloudwatchEventsClient, cronJobName) → {String}
Creates the Cloud Watch event rule that executes the post queue Lambdas once a minute
Parameters:
Name | Type | Description |
---|---|---|
cloudwatchEventsClient |
cloudwatchEventsClient | Looks like |
cronJobName |
String | Initialized in |
Returns:
Returns an Amazon Resource Number identifying the rule we create here
- Type
- String