aws / aws/chalice

Unable to retrieve the request path from event in local mode

Open
#767 1 comment 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

This is a two part issue.

1) The Chalice request object does not expose the original path. I assume this is because the route decorator has already parsed the path in to variables and therefore, you no longer the original. However, there are occasions you might need it. In my case I need to validate a oauth1 signature using the pyLTI module. So this is not really an issue but a feature request.

2) There is a workaround to the limitation above. API Gateway includes the path in the requestContext which is available from the Chalice request object. Unfortunately, Chalice local mode omits the path (and other keys) from the requestContext. This is a bug as local mode should behave the same way as API Gateway whenever possible. As a result my test cases are failing. Will submit a pull request to fix this.

Contributor guide

Open the contributing guide

Research direction

Start by locating Chalice's request object and the local-mode requestContext handling, then compare their values with the API Gateway behavior described in the issue. Review the reporter's failing test cases; done means the original request path is accessible and local mode provides the relevant requestContext keys consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.