aws-amplify / aws-amplify/amplify-cli

create custom authorizer within CLI - manually created authorizer will be overwritten

Open
#2,679 24 comments 8 reactions 0 assignees View on GitHub
auth feature-request p3 pending-review
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

**Is your feature request related to a problem? Please describe.**

Yes, I am unable to configure a custom authorizer (cognito) with the CLI, and also unable to use the CLI to set my api gateway to use COGNITO_USER_POOLS

**Describe the solution you'd like**
something similar to the suggestion in this closed (inactivity) issue:
https://github.com/aws-amplify/amplify-js/issues/1702

Authorizer:
Name: CustomerCognitoAuthorizer
Type: COGNITO_USER_POOLS
ProviderARNs:
- !Ref CustomerCognitoPoolARN
IdentitySource: "method.request.header.Authorization"

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
I've tried to manually created the "custom authorizer", but every time I amplify push it will get overwritten/removed.

amplify-API docs mention:

"Cognito User Pools Authorization
You can use the JWT token provided by the Authentication API to authenticate against API Gateway directly when using a custom authorizer."
.
..but I can't find a way to create this custom authorizer in the CLI.
Am I just going about this the wrong way??

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Amplify CLI API configuration and the Cognito User Pools authorization documentation referenced in the issue. Determine how a custom authorizer can be represented without being removed during amplify push, then verify that the configured API Gateway authorizer and COGNITO_USER_POOLS settings persist after deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
api, authentication, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.