question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Enabled" option not working (warmer not firing)

See original GitHub issue

I know I 100% setup something wrong, but cannot figure it out for the life of me. Here is my YML

service: policy

provider:
  name: aws
  runtime: nodejs8.10
  environment: ${file(env.yml):${opt:stage, self:provider.stage}}
  iamRoleStatements:
    - Effect: 'Allow'
      Action:
        - 'lambda:InvokeFunction'
      Resource: "*"

plugins:
  - serverless-offline
  - serverless-plugin-warmup

custom:
  warmup:
    enabled: true
    schedule: rate(1 minutes)
    prewarm: true

functions:
  withCustomer:
    handler: handler.withCustomer
    events:
      - http:
          path: /withCustomer
          method: POST
          cors: true
          warmup: true

When I deploy, I immediately see Serverless: WarmUP: no lambda to warm and at the end, I get the following:

functions:
  withCustomer: policy-staging-withCustomer
Serverless: WarmUP: Pre-warming up your functions
Serverless: WarmUp: Error while pre-warming functions

I check the logs, but can’t see anything when I search for “warm” or any tags I’ve tried as well. I know I’m doing something dumb, but can’t see it.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
juanjoDiazcommented, Jan 10, 2019

Hi guys,

There are a couple of problems:

  1. Releases are blocked by the lack of maintainer (see #101) so the code in NPm doesn’t match the latest code in GitHub. In short, the enabled option isn’t even released. Until that’s released you can use the default option instead as shown at https://www.npmjs.com/package/serverless-plugin-warmup#setup (once we release you should go back to enabled). In general, you should use the instructions from NPM and not from GitHub (at the same time we should do a better job to keep GitHub and NPM in sync).
  2. warmup: true at the function level is incorrectly indented. YML works based on indentation. In your code sample it’s inside the http object which inside the events array. It should be at the inside the function withCustomer i.e.:
functions:
  withCustomer:
    handler: handler.withCustomer
    events:
      - http:
          path: /withCustomer
          method: POST
          cors: true
    warmup: true
1reaction
juanjoDiazcommented, Jan 10, 2019

I’ll close this then. Feel free to re-open if something comes up.

And keep an eye for the upcoming release so you can update to the enabled property. 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is my Direct Fired Heater not Working? Troubleshooting ...
If the heater is unplugged, plug it back in and re-fire the heater. This might sound stupid, but it happens more than you...
Read more >
Espar Bunk Heater "No Flame Detected" Issue - YouTube
Before taking your truck to a shop, see if this is what is causing you problems.It might just be that you have not...
Read more >
Solved: Gas Heater Pilot Light on but Not Burner - Angie's List
If the thermocouple isn't sensing enough heat, it prevents the gas control valve of the main burner from opening. Replacing the Thermocouple.
Read more >
Solved! This Is How to Fix a Furnace That's Not Turning On
Check the ignition sensor.​​ Before attempting to clean the sensor, shut off the furnace. A furnace doesn't have an on-off switch, so to...
Read more >
What to Do If Your Heating System Won't Turn On
The reasons above are common when a furnace or heat pump do not turn on at all. Sometimes, you experience a heater working...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found