aws / aws/aws-sam-cli

Feature request: allow to choose one authorizer when there's more than one

Open
#6,628 4 comments 0 reactions 0 assignees View on GitHub
stage/needs-investigation type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Describe your idea/feature/enhancement

There are APIs where more than one Authorizer may be used, for example an api key + Authorization header.
In those cases `sam local start-api` fails with:

```
Error: There must only be a single authorizer defined for path='/' method='get', found '2'
```

### Proposal

Add some flag that allows the user to choose one instead of bypassing the authorizer:

```
sam local start-api --authorizer AzureAuthorizer
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.