I have a request lambda authoriser but when making an http post request to the connection that I created, I realise that the authoriser is not called and it still asks for attaching oauthorization as you can see in the screenshot
here is my function and I need to mention that the identitysource is working fine:
<code>const customAuthorizer = createAuthorizer(scope, "ConnectionsAuth", {
apiId: httpApi.attrApiId,
name: "connectionsauth",
authorizerType: "REQUEST",
authorizerUri: `arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/${props.authorizerArn}/invocations`,
authorizerResultTtlInSeconds: 120,
identitySource: ["$request.header.Authorization"],
authorizerPayloadFormatVersion: "2.0"
}}
</code>
<code>const customAuthorizer = createAuthorizer(scope, "ConnectionsAuth", {
apiId: httpApi.attrApiId,
name: "connectionsauth",
authorizerType: "REQUEST",
authorizerUri: `arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/${props.authorizerArn}/invocations`,
authorizerResultTtlInSeconds: 120,
identitySource: ["$request.header.Authorization"],
authorizerPayloadFormatVersion: "2.0"
}}
</code>
const customAuthorizer = createAuthorizer(scope, "ConnectionsAuth", {
apiId: httpApi.attrApiId,
name: "connectionsauth",
authorizerType: "REQUEST",
authorizerUri: `arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/${props.authorizerArn}/invocations`,
authorizerResultTtlInSeconds: 120,
identitySource: ["$request.header.Authorization"],
authorizerPayloadFormatVersion: "2.0"
}}