aws / aws/chalice

Can't find lamdba name in CDK and can't get os.env on_dynamodb_record

Open
#1,943 3 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

Hi, I have two issues:
```
@app.lambda_function('category_event_handler')
def category_event_handler(event, context):
di['category_event_handler'].handler(event)
di['backup_event_handler'].handler(event)
```
In chalice app I had: `Error: Resource with logical ID 'category_event_handler' was not found in the template`
In the line
`print(self.chalice.get_function('category_event_handler'))`

Second Issue:
In kinesis and dynamodb rais an error
`Resource referenced in Fn::Sub expression with logical ID: 'Token[TOKEN' was not found in the template`
using this line
`@app.on_kinesis_record(stream=os.environ.get('PRODUCT_STREAM', ''))`

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two errors from the reported @app.lambda_function and @app.on_kinesis_record examples, then inspect the generated CDK template and its logical IDs. Check how the named Lambda and environment-based stream references appear during synthesis; done means both references resolve without template errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.