From ef4726aa3f25d49a3a79f3500f6459109088c310 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Wed, 13 May 2026 11:36:05 -0400 Subject: [PATCH] Update SAM template for Google auth, Slack invocation, and deadline change Add SLACK_NOTIFIER_ARN and GOOGLE_CLIENT_ID_PARAM env vars to submit order function with lambda:InvokeFunction policy. Move close-form schedule to Thursday 11:59pm EST/EDT. --- template.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/template.yaml b/template.yaml index b82969f..8e2d1b8 100644 --- a/template.yaml +++ b/template.yaml @@ -230,6 +230,8 @@ Resources: Environment: Variables: FORM_API_KEY_SECRET: meal-order-manager/form-api-key + SLACK_NOTIFIER_ARN: !GetAtt SlackNotifierFunction.Arn + GOOGLE_CLIENT_ID_PARAM: /meal-order-manager/google-client-id Policies: - DynamoDBCrudPolicy: TableName: !Ref OrdersTable @@ -237,6 +239,9 @@ Resources: - Effect: Allow Action: secretsmanager:GetSecretValue Resource: !Sub 'arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:meal-order-manager/*' + - Effect: Allow + Action: lambda:InvokeFunction + Resource: !GetAtt SlackNotifierFunction.Arn Events: SubmitOrder: Type: HttpApi @@ -279,14 +284,14 @@ Resources: CloseEST: Type: Schedule Properties: - Schedule: cron(0 23 ? * THU *) - Description: 'Close form Thursday 6pm EST (23:00 UTC)' + Schedule: cron(59 4 ? * FRI *) + Description: 'Close form Thursday 11:59pm EST (04:59 UTC Friday)' Enabled: true CloseEDT: Type: Schedule Properties: - Schedule: cron(0 22 ? * THU *) - Description: 'Close form Thursday 6pm EDT (22:00 UTC)' + Schedule: cron(59 3 ? * FRI *) + Description: 'Close form Thursday 11:59pm EDT (03:59 UTC Friday)' Enabled: true AggregateOrdersFunction: