Skip to content

Commit

Permalink
Add a new cloud watch trigger rule
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Apr 2, 2024
1 parent 22b889f commit 103f2fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.3'
implementation 'org.opensearch.client:opensearch-rest-high-level-client:2.11.0'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.2.1'
implementation 'software.amazon.awssdk:sts:2.21.33'
implementation 'software.amazon.awssdk:sts:2.25.21'
implementation 'io.github.acm19:aws-request-signing-apache-interceptor:2.3.1'

implementation 'com.amazonaws:aws-lambda-java-core:1.2.3'
Expand Down
6 changes: 5 additions & 1 deletion infrastructure/lib/stacks/metricsWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ export class OpenSearchMetricsWorkflowStack extends Stack {
stateMachineName: 'OpenSearchMetricsWorkflow'
})

new Rule(this, 'MetricsWorkflow', {
new Rule(this, 'MetricsWorkflow-11AM-PST', {
schedule: Schedule.expression('cron(0 18 * * ? *)'),
targets: [new SfnStateMachine(opensearchMetricsWorkflow)],
});
new Rule(this, 'MetricsWorkflow-1AM-PST', {
schedule: Schedule.expression('cron(0 8 * * ? *)'),
targets: [new SfnStateMachine(opensearchMetricsWorkflow)],
});
}

private createMetricsTask(scope: Construct, opensearchDomainStack: OpenSearchDomainStack,
Expand Down

0 comments on commit 103f2fe

Please sign in to comment.