Skip to content

Commit

Permalink
Update crisp website id. Update cloudformation permissions to access …
Browse files Browse the repository at this point in the history
…new lambda function.
  • Loading branch information
eugenchio committed Jan 13, 2025
1 parent 37c684b commit 2e5f97c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions cloudformation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ Resources:
- lambda:UpdateFunctionConfiguration
Effect: Allow
Resource: !GetAtt LandingContactFormLambda.Arn
- Action:
- lambda:GetFunction
- lambda:UpdateFunctionCode
- lambda:UpdateFunctionConfiguration
Effect: Allow
Resource: !GetAtt LandingNewsletterSignUpLambda.Arn
PolicyName: manage-static-website

LambdaExecutionRole:
Expand Down Expand Up @@ -433,7 +439,7 @@ Resources:
Action: lambda:InvokeFunction
FunctionName: !Ref LandingContactFormLambda
Principal: apigateway.amazonaws.com
SourceArn: !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${LandingAPIGateway}/*/*/'
SourceArn: !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${LandingAPIGateway}/*/*/contact'

# Create permission for API Gateway to invoke Lambda
LandingNewsletterSignUpAPIPermission:
Expand All @@ -442,7 +448,7 @@ Resources:
Action: lambda:InvokeFunction
FunctionName: !Ref LandingNewsletterSignUpLambda
Principal: apigateway.amazonaws.com
SourceArn: !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${LandingAPIGateway}/*/*/'
SourceArn: !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${LandingAPIGateway}/*/*/newsletter'

Outputs:
LandingContactFormInvokeURL:
Expand Down
4 changes: 2 additions & 2 deletions deploy/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
#
# Development Token is limited to 500/requests day.
# If needed you can reset the limit here (see login credentials in Notion):
# https://marketplace.crisp.chat/plugins/plugin/421c7588-7ed5-464a-a1f7-8917ae9bafe7/tokens/
CRISP_WEBSITE_ID = '6de2ec98-888b-4ff4-b9be-dab91a460ee6'
# https://marketplace.crisp.chat/plugins/plugin/279fff4f-f709-41d0-80ff-33c01843b905/tokens/
CRISP_WEBSITE_ID = '2aa7bcb2-8094-4624-b64e-112c2ca3a174'

0 comments on commit 2e5f97c

Please sign in to comment.