3 Answers
- Newest
- Most votes
- Most comments
0
According to your screenshot, you didn't change the identity source but you added additional identity source. Unless the request has both header and query string, your authorizer will not be triggered.
If you want to use query string, remove the header identity source.
answered 6 years ago
0
Hi,
I have taken the topic from sahin at GPMES.
We had multible problems, which has been solved now.
- Yes, there can only be one identity source. With multible sources it is not working.
- A Cloudformation deploy is not updating the api gateway directly. We have to deploy the updated api description with boto3 or aws cli
- route.request.querystring.authorizationToken is not working. we switched to route.request.querystring.token, which is working well. I don't know, authorizationToken is to long as querystring or something else ...
My cloudformation block looks now like this:
AuthorizerFuncWebsocketsAuthorizer:
Type: 'AWS::ApiGatewayV2::Authorizer'
Properties:
ApiId: !Ref WebsocketsApi
Name: !Sub ${AWS::StackName}-cognito-auth
AuthorizerType: REQUEST
AuthorizerUri:
Fn::Sub:
arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ApiCognitoAuthenticatorApi.Arn}/invocations
IdentitySource:
- route.request.querystring.token
answered 6 years ago
Relevant content
- asked 6 years ago
- asked 5 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 3 years ago