Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- service: social-feeds
- provider:
- name: aws
- runtime: nodejs8.10
- stage: dev
- region: eu-west-1
- environment:
- SOCIAL_FEED_TWITTER_TABLE: "twitter-feed-${self:service}-${opt:stage, self:provider.stage}"
- iamRoleStatements:
- - Effect: Allow
- Action:
- - dynamodb:Query
- - dynamodb:Scan
- - dynamodb:GetItem
- - dynamodb:PutItem
- Resource: "*"
- resources:
- Resources:
- SocialFeedsDynamoDbTable:
- Type: "AWS::DynamoDB::Table"
- DeletionPolicy: Retain
- Properties:
- AttributeDefinitions:
- -
- AttributeName: "id"
- AttributeType: "S"
- KeySchema:
- -
- AttributeName: "id"
- KeyType: "HASH"
- ProvisionedThroughput:
- ReadCapacityUnits: 1
- WriteCapacityUnits: 1
- StreamSpecification:
- StreamViewType: "NEW_AND_OLD_IMAGES"
- TableName: ${self:provider.environment.SOCIAL_FEED_TWITTER_TABLE}
- functions:
- fetchFeeds:
- handler: src/handler.fetchFeedsFn
- events:
- - schedule:
- rate: rate(10 minutes)
Add Comment
Please, Sign In to add comment