Skip to content

Instantly share code, notes, and snippets.

@ranman
Created December 7, 2022 17:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ranman/dc56790ca8927e1d99cadb98f79410b3 to your computer and use it in GitHub Desktop.
Save ranman/dc56790ca8927e1d99cadb98f79410b3 to your computer and use it in GitHub Desktop.
export interface FunctionUrlRequest {
version: '2.0';
routeKey: '$default';
rawPath?: string;
rawQueryString?: string;
cookies?: string[];
headers: { [header: string]: string };
queryStringParameters: { [parameter: string]: string };
requestContext: {
accountId: string;
apiId?: string;
authentication?: null;
authorizer?: {
iam?: {
accessKey: string;
accountId: string;
callerId: string;
cognitoIdentity?: null;
principalOrgId: string;
userArn: string;
userId: string;
};
} | null;
domainName: string;
domainPrefix: string;
http: {
method: string;
path: string;
protocol: string;
sourceIp: string;
userAgent: string;
};
requestId: string;
routeKey: '$default';
stage: '$default';
time: string;
timeEpoch: string;
};
body: string | null;
pathParameters: null;
isBase64Encoded: boolean;
stageVariables: null;
}
export interface FunctionUrlResponse {
statusCode: number;
headers?: { [header: string]: string | undefined };
body?: string;
cookies?: string[];
isBase64Encoded?: boolean;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment