service: ticker

frameworkVersion: ">=1.1.0"

custom:
  bucket: ${env:STELLARTERM_S3_BUCKET}

provider:
  name: aws
  runtime: nodejs6.10
  stage: dev
  region: us-west-2
  timeout: 30
  iamRoleStatements:
    - Effect: Allow
      Action:
        - s3:*
      Resource: "arn:aws:s3:::${self:custom.bucket}/*"

functions:
  ticker:
    handler: handler.ticker
    environment:
      BUCKET: ${self:custom.bucket}
  cronTicker:
    handler: handler.ticker
    events:
      # Invoke Lambda function every minute
      - schedule: rate(5 minutes)
    environment:
      BUCKET: ${self:custom.bucket}

service: ticker

frameworkVersion: ">=1.1.0"

custom:
  bucket: ${env:STELLARTERM_S3_BUCKET}

provider:
  name: aws
  runtime: nodejs6.10
  stage: dev
  region: us-west-2
  timeout: 30
  memorySize: 256
  iamRoleStatements:
    - Effect: Allow
      Action:
        - s3:*
      Resource: "arn:aws:s3:::${self:custom.bucket}/*"

functions:
  ticker:
    handler: handler.ticker
    environment:
      BUCKET: ${self:custom.bucket}
  cronTicker:
    handler: handler.ticker
    events:
      # Invoke Lambda function every minute
      - schedule: rate(5 minutes)
    environment:
      BUCKET: ${self:custom.bucket}

Reduce AWS lambda memory usage by 75% while only increasing run time by 10% to save money
Reduce AWS lambda memory usage by 75% while only increasing run time by 10% to save money
