aws / aws/chalice

`chalice invoke` command does not work with CDK

Open
#1,965 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

I have a small lambda decorated with `@app.lambda_function()`, I can trigger it with `aws lambda invoke`, but not 'chalice invoke. Using the chalice command in the runtime folder I get `Error: could not find a lambda function named main_task.`

```
@app.lambda_function()
def main_task(event, context=None):
sync_data()
```

cdk --version
2.37.1 (build f15dee0)

chalice --version
chalice 1.27.1, python 3.7.12, darwin 21.6.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `chalice invoke` from the runtime folder with a CDK-deployed Lambda decorated with `@app.lambda_function()`. Trace how the command discovers the function named `main_task` and compare that with the function available through `aws lambda invoke`. Done means the command successfully invokes the CDK Lambda or clearly reports the unsupported integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.