Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support asynchronous member processing #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions cloudformation/iam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Parameters:
Default: undefined
Type: String
AllowedPattern: ^[a-zA-Z0-9]+[a-zA-Z0-9-]+[a-zA-Z0-9]+$
SNSTopicName:
Type: String
AllowedPattern: ^[a-zA-Z0-9]+[a-zA-Z0-9-]+[a-zA-Z0-9]+$

Conditions:
AuthorizerFunctionEnabled:
Fn::Not:
Expand Down Expand Up @@ -95,6 +99,15 @@ Resources:
- !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-membership-api-external-lists
- !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-membership-api-provisioning-logs
PolicyName: lambda-dynamo
- PolicyDocument:
Version: 2012-10-17
Statement:
- Action:
- sns:Publish
Effect: Allow
Resource:
- !Sub arn:aws:sns:${AWS::Region}:${AWS::AccountId}:${SNSTopicName}
PolicyName: lambda-sns
Outputs:
MainFunctionRoleArn:
Description: Main API IAM role ARN
Expand Down
8 changes: 7 additions & 1 deletion cloudformation/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Resources:
Parameters:
LambdaFunctionName: !Sub ${ApplicationPrefix}-lambda
AuthLambdaFunctionName: !Sub ${ApplicationPrefix}-auth-lambda
SNSTopicName: !Sub ${ApplicationPrefix}-member-added-topic

AppLogGroups:
Type: AWS::Serverless::Application
Expand Down Expand Up @@ -299,4 +300,9 @@ Resources:
- !Ref AWS::AccountId
- ":"
- !Ref AppApiGateway
- "/*/*/*"
- "/*/*/*"

MemberAddedSNSTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: !Sub ${ApplicationPrefix}-member-added-topic
Loading