Chalice: lambda_timeout doesn't work from config.json

Created on 29 Apr 2019  路  5Comments  路  Source: aws/chalice

I've been referring to the docs here
I'm setting up an application for a job which takes more than 60 seconds to run.
I've defined my env vars in the config.json which work, but lambda_timeout doesn't reflect up when i do chalice deploy.
I'm defining everything under dev stage.

Most helpful comment

@Rubyj It works if I keep timeout in the scope of stages directly and not in functions. Thanks

All 5 comments

Paste your config here so we can see please.

As @Rubyj mentioned posting your config would help.

Hey @Rubyj @joguSD
Here's my config

{
  "version": "2.0",
  "app_name": "issue-poll",
  "stages": {
    "dev": {
      "api_gateway_stage": "api",
      "environment_variables": {
        "GITHUB_TOKEN": "",
        "SLACK_TOKEN": ""
      },
      "lambda_functions": {
        "issue-poll-dev-post_issues": {
          "lambda_timeout": 600
        }
      }
    }
  }
}

The lambda_timeout as you can see is set to 600(seconds) which doesn't reflect on my lambda instance and is set to a minute.

@dhruvagarwal I am not sure about your setup, but my working setup looks like the following:

{
  "version": "1.0",
  "app_name": "issue-poll",
  "stages": {
    "dev": {
      "environment_variables": {
        "TEST": "VALUE"
      },
      "lambda_memory_size": 128,
      "lambda_timeout": 120
    }
  }
}

My timeout is included with my stage. I think you could also bring the timeout out of your stage as well alongside app_name.

@Rubyj It works if I keep timeout in the scope of stages directly and not in functions. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrdavidhanson picture mrdavidhanson  路  3Comments

laolsson picture laolsson  路  4Comments

variable picture variable  路  4Comments

davidolmo picture davidolmo  路  3Comments

jarretraim picture jarretraim  路  3Comments