Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Authorizer identifier specified #304

Closed
budowski opened this issue Apr 25, 2017 · 5 comments
Closed

Invalid Authorizer identifier specified #304

budowski opened this issue Apr 25, 2017 · 5 comments

Comments

@budowski
Copy link

I'm getting the following error when doing chalice deploy:
An error occurred (BadRequestException) when calling the CreateDeployment operation: Invalid Authorizer identifier specified

Basically, I have an endpoint configured with a CognitoUserPool:

@app.route('/myEndpoint', authorizer_name='MyUserPool', cors=True, methods=['GET'])
def myEndpoint():
    pass

app.define_authorizer(
    name='MyUserPool',
    header='Authorization',
    auth_type='cognito_user_pools',
    provider_arns=['arn:aws:cognito-idp:us-east-1:123456:userpool/us-east-1_abcdef']
)

When I look at the API Gateway console, it does create the API endpoint correctly, but for that resource's Method Request, under Authorization, it shows Invalid - so I manually change it to MyUserPool (by selecting the appropriate value from the dropdown menu) and deploy the changes (from the AWS console).

I should note that after that, everything works properly (the next chalice deploy works, and the API authentication works), it's just that the initial deploy fails.

I also made sure the ARN and user pool name are correct, and that the user pool is configured properly (with App ID, etc.)

@budowski
Copy link
Author

Update: Apparently this is also fixable by just calling chalice deploy a second time (this sets the correct Authorization for that endpoint).

@stealthycoin
Copy link
Contributor

Which version of chalice is this under?

@budowski
Copy link
Author

It happened a few times under 0.8.0, and once under 0.8.1.

@kyleknap
Copy link
Contributor

I am currently seeing this under 0.10.0 as well. I think it is specific to GET's because I have some POSTs that use a cognito authorizer, but after I added a new route that used a GET with the same Cognito authorizer, I got the error:

ERROR - While deploying your chalice application, received the following error:

 An error occurred (BadRequestException) when calling the CreateDeployment 
 operation: Invalid Authorizer identifier specified

I can also confirm after running chalice deploy a second time, the deployment goes through.

@stealthycoin
Copy link
Contributor

This should be fixed now with this merged: #381

Feel free to open a new issue if you are still having issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants