Created
April 23, 2020 19:03
-
-
Save digitalbase/97b76a7f03dd833e0acab600a6a28af0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: solving-marketing-attribution | |
| custom: | |
| # sma = Solving Marketing Attribution | |
| tableIdentify: 'sma-identify-${self:provider.stage}' | |
| tablePage: 'sma-event-page-${self:provider.stage}' | |
| provider: | |
| name: aws | |
| runtime: nodejs10.x | |
| stage: dev | |
| region: eu-west-1 | |
| iamRoleStatements: | |
| - Effect: Allow | |
| Action: | |
| - dynamodb:Query | |
| - dynamodb:Scan | |
| - dynamodb:GetItem | |
| - dynamodb:PutItem | |
| - dynamodb:UpdateItem | |
| - dynamodb:DeleteItem | |
| - dynamodb:ListStreams | |
| Resource: | |
| - { "Fn::GetAtt": ["SegmentIdentifyDynamoDBTable", "Arn" ] } | |
| - { "Fn::GetAtt": ["SegmentPageDynamoDBTable", "Arn" ] } | |
| environment: | |
| IDENTIFY_TABLE: ${self:custom.tableIdentify} | |
| PAGE_TABLE: ${self:custom.tablePage} | |
| functions: | |
| hello: | |
| handler: index.handler | |
| events: | |
| - http: 'POST /events' | |
| resources: | |
| Resources: | |
| SegmentIdentifyDynamoDBTable: | |
| Type: 'AWS::DynamoDB::Table' | |
| Properties: | |
| AttributeDefinitions: | |
| - AttributeName: messageId | |
| AttributeType: S | |
| KeySchema: | |
| - AttributeName: messageId | |
| KeyType: HASH | |
| ProvisionedThroughput: | |
| ReadCapacityUnits: 1 | |
| WriteCapacityUnits: 1 | |
| TableName: ${self:custom.tableIdentify} | |
| SegmentPageDynamoDBTable: | |
| Type: 'AWS::DynamoDB::Table' | |
| Properties: | |
| AttributeDefinitions: | |
| - AttributeName: messageId | |
| AttributeType: S | |
| KeySchema: | |
| - AttributeName: messageId | |
| KeyType: HASH | |
| ProvisionedThroughput: | |
| ReadCapacityUnits: 1 | |
| WriteCapacityUnits: 1 | |
| TableName: ${self:custom.tablePage} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment