aws / aws/chalice

API Gateway does not have permissions to invoke Custom Authorizer by default

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

I have created a custom authorizer in my application (actually declared in a BluePrint).
`CustomAuthorizer(
'DocManCustomAuth', header='Authorization',
authorizer_uri=(auth_arn))`
However, when I package and deploy the function (using cloudformation), all authorizations fail with:
`Execution failed due to configuration error: Invalid permissions on Lambda function
Fri Mar 20 06:28:55 UTC 2020 : Execution failed due to configuration error: Authorizer error
Fri Mar 20 06:28:55 UTC 2020 : AuthorizerConfigurationException
`
I have to delete all references and add another authorizer (pointing to the same function) manually to work. When adding the authorizer, I am given the choice on API Gateway console to give the requisite permissions to API Gateway to invoke the lambda function. That's when it starts working.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the BluePrint CustomAuthorizer and CloudFormation deployment define the authorizer and its Lambda permissions. Compare that generated configuration with the permission added through the API Gateway console; done means a newly deployed custom authorizer accepts requests without manually deleting and recreating it.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, authorization, cloud
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.