Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 515 Bytes

DenyAll.md

File metadata and controls

32 lines (25 loc) · 515 Bytes

Deny all responses

Deny access to the api completely

Usage

import { DENY_ALL_RESPONSE } from '@distinction-dev/lambda-authorizer-utils';

export const authorizer = (event: APIGatewayRequestAuthorizerEvent) => {
    return DENY_ALL_RESPONSE
}

Properties

response = {
  principalId: "deny-all-user",
  policyDocument: {
    Version: "2012-10-17",
    Statement: [
      {
        Action: "execute-api:Invoke",
        Effect: "Deny",
        Resource: ["*"],
      },
    ],
  },
};