Guest User

Untitled

a guest
Jun 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. service: social-feeds
  2. provider:
  3. name: aws
  4. runtime: nodejs8.10
  5. stage: dev
  6. region: eu-west-1
  7. environment:
  8. SOCIAL_FEED_TWITTER_TABLE: "twitter-feed-${self:service}-${opt:stage, self:provider.stage}"
  9. iamRoleStatements:
  10. - Effect: Allow
  11. Action:
  12. - dynamodb:Query
  13. - dynamodb:Scan
  14. - dynamodb:GetItem
  15. - dynamodb:PutItem
  16. Resource: "*"
  17.  
  18. resources:
  19. Resources:
  20. SocialFeedsDynamoDbTable:
  21. Type: "AWS::DynamoDB::Table"
  22. DeletionPolicy: Retain
  23. Properties:
  24. AttributeDefinitions:
  25. -
  26. AttributeName: "id"
  27. AttributeType: "S"
  28. KeySchema:
  29. -
  30. AttributeName: "id"
  31. KeyType: "HASH"
  32. ProvisionedThroughput:
  33. ReadCapacityUnits: 1
  34. WriteCapacityUnits: 1
  35. StreamSpecification:
  36. StreamViewType: "NEW_AND_OLD_IMAGES"
  37. TableName: ${self:provider.environment.SOCIAL_FEED_TWITTER_TABLE}
  38.  
  39. functions:
  40. fetchFeeds:
  41. handler: src/handler.fetchFeedsFn
  42. events:
  43. - schedule:
  44. rate: rate(10 minutes)
Add Comment
Please, Sign In to add comment