Skip to content

Commit

Permalink
OPHYK-212 Fix health check alarm
Browse files Browse the repository at this point in the history
Tell CDK explicitly the alarms lambda is on the same account so that it
actually creates the AWS::Lambda::Permission resource
  • Loading branch information
rce committed Dec 4, 2024
1 parent 1a0b3be commit d9102cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions infra/src/health-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ type RegionalHealthCheckStackProps = cdk.StackProps & {
class RegionalHealthCheckStack extends cdk.Stack {
constructor(scope: constructs.Construct, id: string, props: RegionalHealthCheckStackProps) {
super(scope, id, props);
const alarmsToSlackLambda = lambda.Function.fromFunctionArn(
const alarmsToSlackLambda = lambda.Function.fromFunctionAttributes(
this,
"AlarmsToSlackLambda",
props.alarmsToSlackLambdaArn
{
functionArn: props.alarmsToSlackLambdaArn,
sameEnvironment: true
},
)
const globalAlarmTopic = sns.Topic.fromTopicArn(
this,
Expand Down

0 comments on commit d9102cc

Please sign in to comment.