Created
June 21, 2018 12:21
-
-
Save raysrashmi/585e90a1610f19fc640928fd109c279b to your computer and use it in GitHub Desktop.
This file contains 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: 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment