AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

WebSocketAuthorizer

An authorizer for WebSocket Apis.

Import

import { WebSocketAuthorizer } from 'aws-cdk-lib/aws-apigatewayv2';

Or use the module namespace:

import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.WebSocketAuthorizer

Properties

Configuration passed to the constructor as WebSocketAuthorizerProps.

identitySourceRequired
string[]

The identity source for which authorization is requested.

typeRequired
WebSocketAuthorizerType

The type of authorizer.

webSocketApiRequired
IWebSocketApi

WebSocket Api to attach the authorizer to.

authorizerNameOptional
string

Name of the authorizer.

Default: - id of the WebSocketAuthorizer construct.

authorizerUriOptional
string

The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI.

Default: - required for Request authorizer types

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter