aws / aws/chalice

Init Authorizer with different settings based on stage

Open
#576 8 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

Is it possible to initialize an Authorizer (CognitoUserPoolAuthorizer) with a different set of settings based on the stage the application is deployed to?

E.g. when deploying to a "dev" stage, the following settings will be used:
`authorizer = CognitoUserPoolAuthorizer('dev-userpool', header='Authorization', provider_arns=['arn:aws.....dev...'])`

...while deploying to a "prod" stage, the following settings will be used:
`authorizer = CognitoUserPoolAuthorizer('prod-userpool', header='Authorization', provider_arns=['arn:aws.....prod....'])`

I believe it is possible to do this with a batch-script which is run before calling the `chalice deploy --stage ` command, but it would have been great if this is part of the chalice framework, or could become a part of it in the future.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how `chalice deploy --stage ` handles stage-specific configuration and how `CognitoUserPoolAuthorizer` settings are initialized. Done means authorizer settings can differ between the stated dev and prod deployment stages, with the behavior covered by appropriate project tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
authentication, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.