service: humidor
plugins:
  - serverless-finch
custom:
  client:
    bucketName: humidori
provider:
  name: aws
  runtime: nodejs6.10
  profile: jari
  region: eu-central-1
  environment:
    HUMIDOR_TABLE: humidor
  iamRoleStatements:
    - Effect: Allow
      Action:
        - dynamodb:Query
        - dynamodb:Scan
        - dynamodb:GetItem
      Resource: arn:aws:dynamodb:*:*:table/humidor
functions:
  humidor:
    handler: getHumidorDataLambda.get
    events:
      - http: GET humidori
    memorySize: 128
    timeout: 10
resources:
  Resources:
    HumidorTable:
      Type: 'AWS::DynamoDB::Table'
      Properties:
        AttributeDefinitions:
          -
            AttributeName: source
            AttributeType: S
          -
            AttributeName: timestamp
            AttributeType: S
        KeySchema:
          -
            AttributeName: source
            KeyType: HASH
          -
            AttributeName: timestamp
            KeyType: RANGE
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        TableName: humidor

service: humidori
plugins:
  - serverless-finch
custom:
  client:
    bucketName: humidori
provider:
  name: aws
  runtime: nodejs6.10
  profile: jari
  region: eu-central-1
  environment:
    HUMIDOR_TABLE: humidori
  iamRoleStatements:
    - Effect: Allow
      Action:
        - dynamodb:Query
        - dynamodb:Scan
        - dynamodb:GetItem
      Resource: arn:aws:dynamodb:*:*:table/humidori
functions:
  humidor:
    handler: getHumidorDataLambda.get
    events:
      - http: GET humidori
    memorySize: 128
    timeout: 10
resources:
  Resources:
    HumidorTable:
      Type: 'AWS::DynamoDB::Table'
      Properties:
        AttributeDefinitions:
          -
            AttributeName: source
            AttributeType: S
          -
            AttributeName: timestamp
            AttributeType: N
        KeySchema:
          -
            AttributeName: source
            KeyType: HASH
          -
            AttributeName: timestamp
            KeyType: RANGE
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        TableName: humidori

Update dynamo to support ttl
Update dynamo to support ttl
