Architecture: SNS post to AWS API Gateway with proxy to a lambda function. There is a lambda authorizer with REQUEST module setup to authorize the api requests.
It works fine both from SNS and Postman when there is no Authorization. I can see the messages published in cloudwatch logs.
Issue: Unable to test how SNS will publish a message to API when Authentication is enabled i.e by passing username and password in the api. Postman throws AuthorizerConfigurationException error when url "https://username:password@apiurl.com" is passed.
- Created a new lambda function and associated lambda authorizer to API gateway. -> Request with Authorization Header.
- Modified the gateway response to include WWW-Authenticate header and 'Basic' value
- E2E it works fine when I pass a "Authorization" Header and base64 username:password encoded. Since I want to simulate the SNS to API -> I cannot use Authorization header.
Questions:
- What is the use case of Token vs Request Authorizer?
- What changes should I make to API for it to accept USERNAME and PASSWORD in the URL? The error I receive in POSTMAN in "AuthorizerConfigurationException".