Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async function support (or at least better error message) #646

Closed
getaaron opened this issue Dec 21, 2017 · 1 comment
Closed

async function support (or at least better error message) #646

getaaron opened this issue Dec 21, 2017 · 1 comment
Labels

Comments

@getaaron
Copy link

getaaron commented Dec 21, 2017

I have a working lambda function and am trying to migrate to chalice. This lambda function includes a Python async function:

async def fetch(session, url):

When I run chalice deploy, the deploy fails cryptically:

$ chalice deploy
Loading function
Regen deployment package.
'xml_request'
$

(xml_request is a variable in my lambda function, not sure if that's a coincidence or if chalice has a similar variable name.)

If I comment out the async def function, the deploy goes smoothly.

  • IMO, chalice should support async functions since lambda supports them (despite the comments in Support asynchronous function #637)
  • if chalice doesn't support them, this should be (1) a documented limitation, and (2) there should be a friendly explanation that the function as written is incompatible with chalice and to either rewrite it or find another deployment solution

CC @rajasimon

@joguSD
Copy link
Contributor

joguSD commented Dec 22, 2017

This is actually a bug in the policy generation analyzer. It's definitely not our intention to prohibit the use of async in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants