Skip to content

Commit

Permalink
Switch to cloudwatch scheduled events for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyler committed Jan 22, 2024
1 parent d6911bb commit 8b8e63a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lambdas/query-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ anyhow = "1.0.79"
aws-config = "1.1.2"
aws-sdk-cloudwatch = "1.11.0"
aws-sdk-config = "1.11.0"
aws_lambda_events = { version = "0.12.0", default-features = false, features = ["eventbridge"] }
aws_lambda_events = { version = "0.12.0" }
base64 = "0.21.7"
deltalake = { version = "0.16.5", features = ["datafusion", "s3"] }

Expand Down
4 changes: 2 additions & 2 deletions lambdas/query-metrics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// This lambda function will run configured datafusion queries and report results CloudWatch
/// metrics.
///
use aws_lambda_events::event::eventbridge::EventBridgeEvent;
use aws_lambda_events::event::cloudwatch_events::CloudWatchEvent;
use aws_sdk_cloudwatch::types::MetricDatum;
use deltalake::datafusion::common::*;
use deltalake::datafusion::execution::context::SessionContext;
Expand All @@ -13,7 +13,7 @@ use std::sync::Arc;

mod config;

async fn function_handler(_event: LambdaEvent<EventBridgeEvent>) -> Result<(), Error> {
async fn function_handler(_event: LambdaEvent<CloudWatchEvent>) -> Result<(), Error> {
let aws_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await;
let cloudwatch = aws_sdk_cloudwatch::Client::new(&aws_config);

Expand Down

0 comments on commit 8b8e63a

Please sign in to comment.