diff --git a/build.gradle b/build.gradle index 738c9cb..ca24666 100644 --- a/build.gradle +++ b/build.gradle @@ -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' diff --git a/infrastructure/lib/stacks/metricsWorkflow.ts b/infrastructure/lib/stacks/metricsWorkflow.ts index 57b3411..881208f 100644 --- a/infrastructure/lib/stacks/metricsWorkflow.ts +++ b/infrastructure/lib/stacks/metricsWorkflow.ts @@ -29,10 +29,16 @@ export class OpenSearchMetricsWorkflowStack extends Stack { stateMachineName: 'OpenSearchMetricsWorkflow' }) - new Rule(this, 'MetricsWorkflow', { + new Rule(this, 'MetricsWorkflow-11AM-PDT', { schedule: Schedule.expression('cron(0 18 * * ? *)'), targets: [new SfnStateMachine(opensearchMetricsWorkflow)], }); + + // This rule is to ensure OpenSearch Dashboards does not show 0 values in visualizations when used now/d-now-1/d + new Rule(this, 'MetricsWorkflow-12AM-PDT', { + schedule: Schedule.expression('cron(0 7 * * ? *)'), + targets: [new SfnStateMachine(opensearchMetricsWorkflow)], + }); } private createMetricsTask(scope: Construct, opensearchDomainStack: OpenSearchDomainStack,