From 517dd7bc361d4c6fb80578afc263a1d5f8aca314 Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Fri, 13 Dec 2024 14:49:37 +1300 Subject: [PATCH] refactor: force strings for api keys --- packages/_infra/src/analytics/edge.analytics.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/_infra/src/analytics/edge.analytics.ts b/packages/_infra/src/analytics/edge.analytics.ts index 31f049be5..e5e338c94 100644 --- a/packages/_infra/src/analytics/edge.analytics.ts +++ b/packages/_infra/src/analytics/edge.analytics.ts @@ -66,8 +66,8 @@ export class EdgeAnalytics extends Stack { [Env.Analytics.CacheBucket]: `s3://${cacheBucket.bucketName}`, [Env.Analytics.CloudFrontSourceBucket]: `s3://${logBucket.bucketName}`, [Env.Analytics.MaxRecords]: String(24 * 7 * 4), - [Env.Analytics.ElasticId]: Env.get(Env.Analytics.ElasticId), - [Env.Analytics.ElasticApiKey]: Env.get(Env.Analytics.ElasticApiKey), + [Env.Analytics.ElasticId]: Env.get(Env.Analytics.ElasticId) ?? '', + [Env.Analytics.ElasticApiKey]: Env.get(Env.Analytics.ElasticApiKey) ?? '', AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', }, logRetention: RetentionDays.ONE_MONTH, @@ -78,7 +78,7 @@ export class EdgeAnalytics extends Stack { logBucket.grantRead(v2Lambda); // Run this lambda function every hour - new Rule(this, 'AnalyticRule', { schedule: Schedule.rate(Duration.hours(1)) }).addTarget( + new Rule(this, 'AnalyticV2Rule', { schedule: Schedule.rate(Duration.hours(1)) }).addTarget( new LambdaFunction(v2Lambda), ); }