Skip to content

Instantly share code, notes, and snippets.

@jmelloy
Created July 2, 2017 18:26
Show Gist options
  • Save jmelloy/4740d33a5f5fc73f7d02d79735340663 to your computer and use it in GitHub Desktop.
Save jmelloy/4740d33a5f5fc73f7d02d79735340663 to your computer and use it in GitHub Desktop.
service: s3-to-bq
plugins:
- serverless-sqs-alarms-plugin
- serverless-external-s3-event
provider:
name: aws
runtime: python3.6
region: us-west-2
stage: dev
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
Resource:
- arn:aws:dynamodb:*:*:table/${self:custom.jobs}
custom:
stage: ${opt:stage, self:provider.stage}
prefix: ${self:service}-${self:custom.stage}
jobs: ${self:custom.prefix}-job
resources:
Resources:
Jobs:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:custom.jobs}
AttributeDefinitions:
- AttributeName: timestamp
AttributeType: S
KeySchema:
- AttributeName: timestamp
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment