@types/aws-lambda
- Version 8.10.122
- Published
- 137 kB
- No dependencies
- MIT license
Install
npm i @types/aws-lambda
yarn add @types/aws-lambda
pnpm add @types/aws-lambda
Overview
TypeScript definitions for AWS Lambda
Index
Interfaces
Type Aliases
- AccountTakeOverActionType
- ALBCallback
- ALBHandler
- AmplifyGraphQlResolverHandler
- APIGatewayAuthorizerCallback
- APIGatewayAuthorizerEvent
- APIGatewayAuthorizerHandler
- APIGatewayAuthorizerWithContextCallback
- APIGatewayAuthorizerWithContextHandler
- APIGatewayEvent
- APIGatewayEventDefaultAuthorizerContext
- APIGatewayEventLambdaAuthorizerContext
- APIGatewayEventRequestContext
- APIGatewayProxyCallback
- APIGatewayProxyCallbackV2
- APIGatewayProxyEvent
- APIGatewayProxyEventV2
- APIGatewayProxyEventV2WithIAMAuthorizer
- APIGatewayProxyEventV2WithJWTAuthorizer
- APIGatewayProxyEventV2WithLambdaAuthorizer
- APIGatewayProxyHandler
- APIGatewayProxyHandlerV2
- APIGatewayProxyHandlerV2WithIAMAuthorizer
- APIGatewayProxyHandlerV2WithJWTAuthorizer
- APIGatewayProxyHandlerV2WithLambdaAuthorizer
- APIGatewayProxyResultV2
- APIGatewayProxyWebsocketEventV2
- APIGatewayProxyWebsocketHandlerV2
- APIGatewayProxyWithCognitoAuthorizerEvent
- APIGatewayProxyWithCognitoAuthorizerHandler
- APIGatewayProxyWithLambdaAuthorizerEvent
- APIGatewayProxyWithLambdaAuthorizerEventRequestContext
- APIGatewayProxyWithLambdaAuthorizerHandler
- APIGatewayRequestAuthorizerHandler
- APIGatewayRequestAuthorizerWithContextHandler
- APIGatewayRequestIAMAuthorizerHandlerV2
- APIGatewayRequestIAMAuthorizerV2WithContextHandler
- APIGatewayRequestSimpleAuthorizerHandlerV2
- APIGatewayRequestSimpleAuthorizerHandlerV2WithContext
- APIGatewayTokenAuthorizerHandler
- APIGatewayTokenAuthorizerWithContextHandler
- AppSyncAuthorizerHander
- AppSyncAuthorizerHandler
- AppSyncBatchResolverHandler
- AppSyncIdentity
- AppSyncResolverHandler
- ArtifactLocation
- AuthResponse
- AuthResponseContext
- AutoScalingInstanceMarketOption
- AutoScalingScaleInCallback
- AutoScalingScaleInCause
- AutoScalingScaleInHandler
- Callback
- CdkCustomResourceCallback
- CdkCustomResourceEvent
- CdkCustomResourceHandler
- CdkCustomResourceIsCompleteCallback
- CdkCustomResourceIsCompleteEvent
- CdkCustomResourceIsCompleteHandler
- CdkCustomResourceIsCompleteResponse
- CloudFormationCustomResourceEvent
- CloudFormationCustomResourceHandler
- CloudFormationCustomResourceResponse
- CloudFrontOrigin
- CloudFrontRequestCallback
- CloudFrontRequestHandler
- CloudFrontRequestResult
- CloudFrontResponseCallback
- CloudFrontResponseHandler
- CloudFrontResponseResult
- CloudWatchLogsHandler
- CodeBuildCacheType
- CodeBuildCloudWatchStateHandler
- CodeBuildEnvironmentComputeType
- CodeBuildEnvironmentPullCredentialsType
- CodeBuildEnvironmentType
- CodeBuildEnvironmentVariableType
- CodeBuildPhaseStatusType
- CodeBuildPhaseType
- CodeBuildSourceLocationType
- CodeBuildStateType
- CodeCommitHandler
- CodePipelineActionCategory
- CodePipelineActionState
- CodePipelineCloudWatchActionHandler
- CodePipelineCloudWatchEvent
- CodePipelineCloudWatchHandler
- CodePipelineCloudWatchPipelineHandler
- CodePipelineCloudWatchStageHandler
- CodePipelineHandler
- CodePipelineStageState
- CodePipelineState
- CognitoUserPoolEvent
- CognitoUserPoolTriggerHandler
- ConnectContactFlowCallback
- ConnectContactFlowChannel
- ConnectContactFlowHandler
- ConnectContactFlowInitiationMethod
- CreateAuthChallengeTriggerHandler
- CustomAuthorizerCallback
- CustomAuthorizerHandler
- CustomAuthorizerResult
- CustomEmailSenderTriggerEvent
- CustomEmailSenderTriggerHandler
- CustomerAudio
- CustomMessageAdminCreateUserTriggerEvent
- CustomMessageAuthenticationTriggerEvent
- CustomMessageForgotPasswordTriggerEvent
- CustomMessageResendCodeTriggerEvent
- CustomMessageSignUpTriggerEvent
- CustomMessageTriggerEvent
- CustomMessageTriggerHandler
- CustomMessageUpdateUserAttributeTriggerEvent
- CustomMessageVerifyUserAttributeTriggerEvent
- CustomSMSSenderTriggerEvent
- CustomSMSSenderTriggerHandler
- DefineAuthChallengeTriggerHandler
- DynamoDBStreamHandler
- EventBridgeHandler
- FirehoseRecordTransformationStatus
- FirehoseTransformationCallback
- FirehoseTransformationHandler
- Handler
- IoTEvent
- IoTHandler
- IoTPreProvisioningHookHandler
- KinesisStreamHandler
- KinesisStreamTumblingWindowHandler
- LevV2DialogActionWithoutSlot
- LexCallback
- LexDialogAction
- LexHandler
- LexV2Callback
- LexV2DialogAction
- LexV2Handler
- LexV2IntentState
- LexV2Message
- LexV2ResultDialogAction
- LexV2Slot
- LexV2Slots
- MSKHandler
- PostAuthenticationTriggerHandler
- PostConfirmationConfirmForgotPassword
- PostConfirmationConfirmSignUpTriggerEvent
- PostConfirmationTriggerEvent
- PostConfirmationTriggerHandler
- PreAuthenticationTriggerHandler
- PreSignUpAdminCreateUserTriggerEvent
- PreSignUpEmailTriggerEvent
- PreSignUpExternalProviderTriggerEvent
- PreSignUpTriggerEvent
- PreSignUpTriggerHandler
- PreTokenGenerationAuthenticateDeviceTriggerEvent
- PreTokenGenerationAuthenticationTriggerEvent
- PreTokenGenerationHostedAuthTriggerEvent
- PreTokenGenerationNewPasswordChallengeTriggerEvent
- PreTokenGenerationRefreshTokensTriggerEvent
- PreTokenGenerationTriggerEvent
- PreTokenGenerationTriggerHandler
- PrincipalValue
- ProxyCallback
- ProxyHandler
- ProxyResult
- S3BatchCallback
- S3BatchHandler
- S3BatchResultResultCode
- S3CreateEvent
- S3Handler
- S3NotificationEvent
- S3NotificationEventBridgeHandler
- S3ObjectDeletedNotificationEventDetail
- ScheduledHandler
- SecretsManagerRotationEventStep
- SecretsManagerRotationHandler
- SelfManagedKafkaHandler
- SESHandler
- SNSHandler
- SQSHandler
- SQSMessageAttributeDataType
- Statement
- StatementAction
- StatementPrincipal
- StatementResource
- UserMigrationAuthenticationTriggerEvent
- UserMigrationForgotPasswordTriggerEvent
- UserMigrationTriggerEvent
- UserMigrationTriggerHandler
- UserStatus
- VerifyAuthChallengeResponseTriggerHandler
Interfaces
interface ALBEvent
interface ALBEvent {}
property body
body: string | null;
property headers
headers?: ALBEventHeaders | undefined;
property httpMethod
httpMethod: string;
property isBase64Encoded
isBase64Encoded: boolean;
property multiValueHeaders
multiValueHeaders?: ALBEventMultiValueHeaders | undefined;
property multiValueQueryStringParameters
multiValueQueryStringParameters?: | ALBEventMultiValueQueryStringParameters | undefined;
property path
path: string;
property queryStringParameters
queryStringParameters?: ALBEventQueryStringParameters | undefined;
property requestContext
requestContext: ALBEventRequestContext;
interface ALBEventHeaders
interface ALBEventHeaders {}
index signature
[name: string]: string | undefined;
interface ALBEventMultiValueHeaders
interface ALBEventMultiValueHeaders {}
index signature
[name: string]: string[] | undefined;
interface ALBEventMultiValueQueryStringParameters
interface ALBEventMultiValueQueryStringParameters {}
index signature
[name: string]: string[] | undefined;
interface ALBEventQueryStringParameters
interface ALBEventQueryStringParameters {}
index signature
[name: string]: string | undefined;
interface ALBEventRequestContext
interface ALBEventRequestContext {}
property elb
elb: { targetGroupArn: string;};
interface ALBResult
interface ALBResult {}
property body
body?: string | undefined;
property headers
headers?: { [header: string]: boolean | number | string } | undefined;
property isBase64Encoded
isBase64Encoded?: boolean | undefined;
property multiValueHeaders
multiValueHeaders?: | { [header: string]: Array<boolean | number | string> } | undefined;
property statusCode
statusCode: number;
property statusDescription
statusDescription?: string | undefined;
interface AmplifyGraphQlResolverEvent
interface AmplifyGraphQlResolverEvent< TArguments = Record<string, any>, TSource = Record<string, any>> {}
An AWS Amplify GraphQL resolver event. It differs slightly from a native ('direct') AppSync resolver event.
See Also
https://docs.amplify.aws/cli/graphql/custom-business-logic/#structure-of-the-function-event
property arguments
arguments: TArguments;
A map of GraphQL arguments passed to the field being resolved.
property fieldName
fieldName: string;
The field within the given type to resolve.
property identity
identity?: AppSyncIdentity;
The identity used to authenticate the request to AppSync.
property prev
prev: { result: { [key: string]: any } } | null;
The object returned by a possible previous pipeline resolver function.
property request
request: { headers: AppSyncResolverEventHeaders; domainName: string | null;};
The request headers
property source
source: TSource;
The parent object's value if resolving a nested field.
property typeName
typeName: string;
The name of the parent object type (data model) of the field being resolved.
interface APIGatewayAuthorizerResult
interface APIGatewayAuthorizerResult {}
property context
context?: APIGatewayAuthorizerResultContext | null | undefined;
property policyDocument
policyDocument: PolicyDocument;
property principalId
principalId: string;
property usageIdentifierKey
usageIdentifierKey?: string | null | undefined;
interface APIGatewayAuthorizerResultContext
interface APIGatewayAuthorizerResultContext {}
index signature
[name: string]: string | number | boolean | null | undefined;
interface APIGatewayAuthorizerWithContextResult
interface APIGatewayAuthorizerWithContextResult< TAuthorizerContext extends APIGatewayAuthorizerResultContext> {}
property context
context: TAuthorizerContext;
property policyDocument
policyDocument: PolicyDocument;
property principalId
principalId: string;
property usageIdentifierKey
usageIdentifierKey?: string | null | undefined;
interface APIGatewayEventClientCertificate
interface APIGatewayEventClientCertificate {}
property clientCertPem
clientCertPem: string;
property issuerDN
issuerDN: string;
property serialNumber
serialNumber: string;
property subjectDN
subjectDN: string;
property validity
validity: { notAfter: string; notBefore: string;};
interface APIGatewayEventIdentity
interface APIGatewayEventIdentity {}
property accessKey
accessKey: string | null;
property accountId
accountId: string | null;
property apiKey
apiKey: string | null;
property apiKeyId
apiKeyId: string | null;
property caller
caller: string | null;
property clientCert
clientCert: APIGatewayEventClientCertificate | null;
property cognitoAuthenticationProvider
cognitoAuthenticationProvider: string | null;
property cognitoAuthenticationType
cognitoAuthenticationType: string | null;
property cognitoIdentityId
cognitoIdentityId: string | null;
property cognitoIdentityPoolId
cognitoIdentityPoolId: string | null;
property principalOrgId
principalOrgId: string | null;
property sourceIp
sourceIp: string;
property user
user: string | null;
property userAgent
userAgent: string | null;
property userArn
userArn: string | null;
interface APIGatewayEventRequestContextIAMAuthorizer
interface APIGatewayEventRequestContextIAMAuthorizer {}
IAM Authorizer Payload
property iam
iam: { accessKey: string; accountId: string; callerId: string; cognitoIdentity: null; principalOrgId: string; userArn: string; userId: string;};
interface APIGatewayEventRequestContextJWTAuthorizer
interface APIGatewayEventRequestContextJWTAuthorizer {}
JWT Authorizer Payload
property integrationLatency
integrationLatency: number;
property jwt
jwt: { claims: { [name: string]: string | number | boolean | string[] }; scopes: string[];};
property principalId
principalId: string;
interface APIGatewayEventRequestContextLambdaAuthorizer
interface APIGatewayEventRequestContextLambdaAuthorizer<TAuthorizerContext> {}
Lambda Authorizer Payload
property lambda
lambda: TAuthorizerContext;
interface APIGatewayEventRequestContextV2
interface APIGatewayEventRequestContextV2 {}
Works with HTTP API integration Payload Format version 2.0
See Also
- https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
property accountId
accountId: string;
property apiId
apiId: string;
property authentication
authentication?: { clientCert: APIGatewayEventClientCertificate;};
property domainName
domainName: string;
property domainPrefix
domainPrefix: string;
property http
http: { method: string; path: string; protocol: string; sourceIp: string; userAgent: string;};
property requestId
requestId: string;
property routeKey
routeKey: string;
property stage
stage: string;
property time
time: string;
property timeEpoch
timeEpoch: number;
interface APIGatewayEventRequestContextV2WithAuthorizer
interface APIGatewayEventRequestContextV2WithAuthorizer<TAuthorizer> extends APIGatewayEventRequestContextV2 {}
property authorizer
authorizer: TAuthorizer;
interface APIGatewayEventRequestContextWithAuthorizer
interface APIGatewayEventRequestContextWithAuthorizer<TAuthorizerContext> {}
property accountId
accountId: string;
property apiId
apiId: string;
property authorizer
authorizer: TAuthorizerContext;
property connectedAt
connectedAt?: number | undefined;
property connectionId
connectionId?: string | undefined;
property domainName
domainName?: string | undefined;
property domainPrefix
domainPrefix?: string | undefined;
property eventType
eventType?: string | undefined;
property extendedRequestId
extendedRequestId?: string | undefined;
property httpMethod
httpMethod: string;
property identity
identity: APIGatewayEventIdentity;
property messageDirection
messageDirection?: string | undefined;
property messageId
messageId?: string | null | undefined;
property path
path: string;
property protocol
protocol: string;
property requestId
requestId: string;
property requestTime
requestTime?: string | undefined;
property requestTimeEpoch
requestTimeEpoch: number;
property resourceId
resourceId: string;
property resourcePath
resourcePath: string;
property routeKey
routeKey?: string | undefined;
property stage
stage: string;
interface APIGatewayEventWebsocketRequestContextV2
interface APIGatewayEventWebsocketRequestContextV2 {}
Works with Websocket API integration Payload Format version 2.0
See Also
- https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-integration-requests.html
- https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html
property apiId
apiId: string;
property connectedAt
connectedAt: number;
property connectionId
connectionId: string;
property domainName
domainName: string;
property eventType
eventType: 'CONNECT' | 'MESSAGE' | 'DISCONNECT';
property extendedRequestId
extendedRequestId: string;
property messageDirection
messageDirection: 'IN';
property messageId
messageId: string;
property requestId
requestId: string;
property requestTime
requestTime: string;
property requestTimeEpoch
requestTimeEpoch: number;
property routeKey
routeKey: string;
property stage
stage: string;
interface APIGatewayIAMAuthorizerResult
interface APIGatewayIAMAuthorizerResult {}
IAM Authorizer Types
property context
context?: APIGatewayAuthorizerResultContext | null | undefined;
property policyDocument
policyDocument: PolicyDocument;
property principalId
principalId: string;
property usageIdentifierKey
usageIdentifierKey?: string | null | undefined;
interface APIGatewayIAMAuthorizerWithContextResult
interface APIGatewayIAMAuthorizerWithContextResult< TAuthorizerContext extends APIGatewayAuthorizerResultContext> {}
property context
context: TAuthorizerContext;
property policyDocument
policyDocument: PolicyDocument;
property principalId
principalId: string;
property usageIdentifierKey
usageIdentifierKey?: string | null | undefined;
interface APIGatewayProxyCognitoAuthorizer
interface APIGatewayProxyCognitoAuthorizer {}
property claims
claims: { [name: string]: string;};
interface APIGatewayProxyEventBase
interface APIGatewayProxyEventBase<TAuthorizerContext> {}
property body
body: string | null;
property headers
headers: APIGatewayProxyEventHeaders;
property httpMethod
httpMethod: string;
property isBase64Encoded
isBase64Encoded: boolean;
property multiValueHeaders
multiValueHeaders: APIGatewayProxyEventMultiValueHeaders;
property multiValueQueryStringParameters
multiValueQueryStringParameters: APIGatewayProxyEventMultiValueQueryStringParameters | null;
property path
path: string;
property pathParameters
pathParameters: APIGatewayProxyEventPathParameters | null;
property queryStringParameters
queryStringParameters: APIGatewayProxyEventQueryStringParameters | null;
property requestContext
requestContext: APIGatewayEventRequestContextWithAuthorizer<TAuthorizerContext>;
property resource
resource: string;
property stageVariables
stageVariables: APIGatewayProxyEventStageVariables | null;
interface APIGatewayProxyEventHeaders
interface APIGatewayProxyEventHeaders {}
index signature
[name: string]: string | undefined;
interface APIGatewayProxyEventMultiValueHeaders
interface APIGatewayProxyEventMultiValueHeaders {}
index signature
[name: string]: string[] | undefined;
interface APIGatewayProxyEventMultiValueQueryStringParameters
interface APIGatewayProxyEventMultiValueQueryStringParameters {}
index signature
[name: string]: string[] | undefined;
interface APIGatewayProxyEventPathParameters
interface APIGatewayProxyEventPathParameters {}
index signature
[name: string]: string | undefined;
interface APIGatewayProxyEventQueryStringParameters
interface APIGatewayProxyEventQueryStringParameters {}
index signature
[name: string]: string | undefined;
interface APIGatewayProxyEventStageVariables
interface APIGatewayProxyEventStageVariables {}
index signature
[name: string]: string | undefined;
interface APIGatewayProxyEventV2WithRequestContext
interface APIGatewayProxyEventV2WithRequestContext<TRequestContext> {}
Proxy Event with adaptable requestContext for different authorizer scenarios
property body
body?: string;
property cookies
cookies?: string[];
property headers
headers: APIGatewayProxyEventHeaders;
property isBase64Encoded
isBase64Encoded: boolean;
property pathParameters
pathParameters?: APIGatewayProxyEventPathParameters;
property queryStringParameters
queryStringParameters?: APIGatewayProxyEventQueryStringParameters;
property rawPath
rawPath: string;
property rawQueryString
rawQueryString: string;
property requestContext
requestContext: TRequestContext;
property routeKey
routeKey: string;
property stageVariables
stageVariables?: APIGatewayProxyEventStageVariables;
property version
version: string;
interface APIGatewayProxyResult
interface APIGatewayProxyResult {}
Works with Lambda Proxy Integration for Rest API or HTTP API integration Payload Format version 1.0
See Also
- https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
property body
body: string;
property headers
headers?: | { [header: string]: boolean | number | string; } | undefined;
property isBase64Encoded
isBase64Encoded?: boolean | undefined;
property multiValueHeaders
multiValueHeaders?: | { [header: string]: Array<boolean | number | string>; } | undefined;
property statusCode
statusCode: number;
interface APIGatewayProxyStructuredResultV2
interface APIGatewayProxyStructuredResultV2 {}
Interface for structured response with
statusCode
andheaders
Works with HTTP API integration Payload Format version 2.0See Also
- https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
property body
body?: string | undefined;
property cookies
cookies?: string[] | undefined;
property headers
headers?: | { [header: string]: boolean | number | string; } | undefined;
property isBase64Encoded
isBase64Encoded?: boolean | undefined;
property statusCode
statusCode?: number | undefined;
interface APIGatewayProxyWebsocketEventV2WithRequestContext
interface APIGatewayProxyWebsocketEventV2WithRequestContext<TRequestContext> {}
Proxy Websocket Event with adaptable requestContext for different authorizer scenarios
property body
body?: string;
property isBase64Encoded
isBase64Encoded: boolean;
property requestContext
requestContext: TRequestContext;
property stageVariables
stageVariables?: APIGatewayProxyEventStageVariables;
interface APIGatewayRequestAuthorizerEvent
interface APIGatewayRequestAuthorizerEvent {}
property headers
headers: APIGatewayRequestAuthorizerEventHeaders | null;
property httpMethod
httpMethod: string;
property methodArn
methodArn: string;
property multiValueHeaders
multiValueHeaders: APIGatewayRequestAuthorizerEventMultiValueHeaders | null;
property multiValueQueryStringParameters
multiValueQueryStringParameters: APIGatewayRequestAuthorizerEventMultiValueQueryStringParameters | null;
property path
path: string;
property pathParameters
pathParameters: APIGatewayRequestAuthorizerEventPathParameters | null;
property queryStringParameters
queryStringParameters: APIGatewayRequestAuthorizerEventQueryStringParameters | null;
property requestContext
requestContext: APIGatewayEventRequestContextWithAuthorizer<undefined>;
property resource
resource: string;
property stageVariables
stageVariables: APIGatewayRequestAuthorizerEventStageVariables | null;
property type
type: 'REQUEST';
interface APIGatewayRequestAuthorizerEventHeaders
interface APIGatewayRequestAuthorizerEventHeaders {}
index signature
[name: string]: string | undefined;
interface APIGatewayRequestAuthorizerEventMultiValueHeaders
interface APIGatewayRequestAuthorizerEventMultiValueHeaders {}
index signature
[name: string]: string[] | undefined;
interface APIGatewayRequestAuthorizerEventMultiValueQueryStringParameters
interface APIGatewayRequestAuthorizerEventMultiValueQueryStringParameters {}
index signature
[name: string]: string[] | undefined;
interface APIGatewayRequestAuthorizerEventPathParameters
interface APIGatewayRequestAuthorizerEventPathParameters {}
index signature
[name: string]: string | undefined;
interface APIGatewayRequestAuthorizerEventQueryStringParameters
interface APIGatewayRequestAuthorizerEventQueryStringParameters {}
index signature
[name: string]: string | undefined;
interface APIGatewayRequestAuthorizerEventStageVariables
interface APIGatewayRequestAuthorizerEventStageVariables {}
index signature
[name: string]: string | undefined;
interface APIGatewayRequestAuthorizerEventV2
interface APIGatewayRequestAuthorizerEventV2 {}
property cookies
cookies: string[];
property headers
headers?: APIGatewayRequestAuthorizerEventHeaders;
property identitySource
identitySource: string[];
property pathParameters
pathParameters?: APIGatewayRequestAuthorizerEventPathParameters;
property queryStringParameters
queryStringParameters?: APIGatewayRequestAuthorizerEventQueryStringParameters;
property rawPath
rawPath: string;
property rawQueryString
rawQueryString: string;
property requestContext
requestContext: APIGatewayEventRequestContextV2;
property routeArn
routeArn: string;
property routeKey
routeKey: string;
property stageVariables
stageVariables?: APIGatewayRequestAuthorizerEventStageVariables;
property type
type: 'REQUEST';
property version
version: string;
interface APIGatewaySimpleAuthorizerResult
interface APIGatewaySimpleAuthorizerResult {}
Simple Lambda Authorizer Types V2 spec with simple response
See Also
- https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html
property isAuthorized
isAuthorized: boolean;
interface APIGatewaySimpleAuthorizerWithContextResult
interface APIGatewaySimpleAuthorizerWithContextResult<TAuthorizerContext> extends APIGatewaySimpleAuthorizerResult {}
property context
context: TAuthorizerContext;
interface APIGatewayTokenAuthorizerEvent
interface APIGatewayTokenAuthorizerEvent {}
property authorizationToken
authorizationToken: string;
property methodArn
methodArn: string;
property type
type: 'TOKEN';
interface AppSyncAuthorizerEvent
interface AppSyncAuthorizerEvent {}
property authorizationToken
authorizationToken: string;
property requestContext
requestContext: { apiId: string; accountId: string; requestId: string; queryString: string; variables: { [key: string]: any };};
interface AppSyncAuthorizerResult
interface AppSyncAuthorizerResult<TResolverContext = undefined> {}
property deniedFields
deniedFields?: string[];
property isAuthorized
isAuthorized: boolean;
property resolverContext
resolverContext?: TResolverContext;
property ttlOverride
ttlOverride?: number;
interface AppSyncIdentityCognito
interface AppSyncIdentityCognito {}
interface AppSyncIdentityIAM
interface AppSyncIdentityIAM {}
property accountId
accountId: string;
property cognitoIdentityAuthProvider
cognitoIdentityAuthProvider: string;
property cognitoIdentityAuthType
cognitoIdentityAuthType: string;
property cognitoIdentityId
cognitoIdentityId: string;
property cognitoIdentityPoolId
cognitoIdentityPoolId: string;
property sourceIp
sourceIp: string[];
property userArn
userArn: string;
property username
username: string;
interface AppSyncIdentityLambda
interface AppSyncIdentityLambda {}
property resolverContext
resolverContext: any;
interface AppSyncIdentityOIDC
interface AppSyncIdentityOIDC {}
interface AppSyncResolverEvent
interface AppSyncResolverEvent<TArguments, TSource = Record<string, any> | null> {}
See https://docs.aws.amazon.com/appsync/latest/devguide/resolver-context-reference.html
Parameter TArguments
type of the arguments
Parameter TSource
type of the source
property arguments
arguments: TArguments;
property identity
identity?: AppSyncIdentity;
property info
info: { selectionSetList: string[]; selectionSetGraphQL: string; parentTypeName: string; fieldName: string; variables: { [key: string]: any };};
property prev
prev: { result: { [key: string]: any } } | null;
property request
request: { headers: AppSyncResolverEventHeaders; /** The API's custom domain if used for the request. */ domainName: string | null;};
property source
source: TSource;
property stash
stash: { [key: string]: any };
interface AppSyncResolverEventHeaders
interface AppSyncResolverEventHeaders {}
index signature
[name: string]: string | undefined;
interface Artifact
interface Artifact {}
interface AttributeValue
interface AttributeValue {}
property B
B?: string | undefined;
property BOOL
BOOL?: boolean | undefined;
property BS
BS?: string[] | undefined;
property L
L?: AttributeValue[] | undefined;
property M
M?: { [id: string]: AttributeValue } | undefined;
property N
N?: string | undefined;
property NS
NS?: string[] | undefined;
property NULL
NULL?: boolean | undefined;
property S
S?: string | undefined;
property SS
SS?: string[] | undefined;
interface AutoScalingInstanceRecord
interface AutoScalingInstanceRecord {}
property AvailabilityZone
AvailabilityZone: string;
property InstanceId
InstanceId: string;
property InstanceMarketOption
InstanceMarketOption: AutoScalingInstanceMarketOption;
property InstanceType
InstanceType: string;
interface AutoScalingScaleInEvent
interface AutoScalingScaleInEvent {}
An Auto Scaling Group may trigger a Scale In Event when you have attached a custom termination policy function. This event and the expected response are described in the Auto Scaling docs at:
https://docs.aws.amazon.com/autoscaling/ec2/userguide/lambda-custom-termination-policy.html
property AutoScalingGroupARN
AutoScalingGroupARN: string;
property AutoScalingGroupName
AutoScalingGroupName: string;
property CapacityToTerminate
CapacityToTerminate: AutoScalingTerminationRequest[];
property Cause
Cause: AutoScalingScaleInCause;
property HasMoreInstances
HasMoreInstances?: boolean;
property Instances
Instances: AutoScalingInstanceRecord[];
interface AutoScalingScaleInResult
interface AutoScalingScaleInResult {}
property InstanceIDs
InstanceIDs: string[];
interface AutoScalingTerminationRequest
interface AutoScalingTerminationRequest {}
property AvailabilityZone
AvailabilityZone: string;
property Capacity
Capacity: number;
property InstanceMarketOption
InstanceMarketOption: AutoScalingInstanceMarketOption;
interface BaseCustomEmailSenderTriggerEvent
interface BaseCustomEmailSenderTriggerEvent<T extends string> extends BaseTriggerEvent<T> {}
property request
request: { type: string; code: string | null; userAttributes: StringMap; clientMetadata?: StringMap | undefined;};
interface BaseCustomMessageTriggerEvent
interface BaseCustomMessageTriggerEvent<T extends string> extends BaseTriggerEvent<T> {}
property request
request: { userAttributes: StringMap; codeParameter: string; linkParameter: string; /** * This is null for all events other than the AdminCreateUser action. */ usernameParameter: string | null; clientMetadata?: StringMap | undefined;};
property response
response: { smsMessage: string | null; emailMessage: string | null; emailSubject: string | null;};
interface BaseCustomSMSSenderTriggerEvent
interface BaseCustomSMSSenderTriggerEvent<T extends string> extends BaseTriggerEvent<T> {}
property request
request: { type: string; code: string | null; userAttributes: StringMap; clientMetadata?: StringMap | undefined;};
interface BasePostConfirmationTriggerEvent
interface BasePostConfirmationTriggerEvent<T extends string> extends BaseTriggerEvent<T> {}
property request
request: { userAttributes: StringMap; clientMetadata?: StringMap | undefined;};
interface BasePreSignUpTriggerEvent
interface BasePreSignUpTriggerEvent<T extends string> extends BaseTriggerEvent<T> {}
interface BasePreTokenGenerationTriggerEvent
interface BasePreTokenGenerationTriggerEvent<T extends string> extends BaseTriggerEvent<T> {}
property request
request: { userAttributes: StringMap; groupConfiguration: GroupOverrideDetails; clientMetadata?: StringMap | undefined;};
property response
response: { claimsOverrideDetails: { claimsToAddOrOverride?: StringMap | undefined; claimsToSuppress?: string[] | undefined; groupOverrideDetails?: GroupOverrideDetails | undefined; };};
interface BaseStatement
interface BaseStatement {}
interface BaseUserMigrationTriggerEvent
interface BaseUserMigrationTriggerEvent<T extends string> extends BaseTriggerEvent<T> {}
property request
request: { password: string; validationData?: StringMap | undefined; clientMetadata?: StringMap | undefined;};
property response
response: { userAttributes: StringMap; finalUserStatus?: UserStatus | undefined; messageAction?: 'RESEND' | 'SUPPRESS' | undefined; desiredDeliveryMediums: Array<'SMS' | 'EMAIL'>; forceAliasCreation?: boolean | undefined;};
interface CdkCustomResourceIsCompleteResponseSuccess
interface CdkCustomResourceIsCompleteResponseSuccess {}
property Data
Data?: | { [Key: string]: any; } | undefined;
This will be merged with the
Data
property of the onEvent handler's response.
property IsComplete
IsComplete: true;
interface CdkCustomResourceIsCompleteResponseWaiting
interface CdkCustomResourceIsCompleteResponseWaiting {}
property IsComplete
IsComplete: false;
interface CdkCustomResourceResponse
interface CdkCustomResourceResponse {}
property Data
Data?: | { [Key: string]: any; } | undefined;
property PhysicalResourceId
PhysicalResourceId?: string;
index signature
[Key: string]: any;
interface ClientContext
interface ClientContext {}
interface ClientContextClient
interface ClientContextClient {}
property appPackageName
appPackageName: string;
property appTitle
appTitle: string;
property appVersionCode
appVersionCode: string;
property appVersionName
appVersionName: string;
property installationId
installationId: string;
interface ClientContextEnv
interface ClientContextEnv {}
property locale
locale: string;
property make
make: string;
property model
model: string;
property platform
platform: string;
property platformVersion
platformVersion: string;
interface CloudFormationCustomResourceCreateEvent
interface CloudFormationCustomResourceCreateEvent extends CloudFormationCustomResourceEventCommon {}
property RequestType
RequestType: 'Create';
interface CloudFormationCustomResourceDeleteEvent
interface CloudFormationCustomResourceDeleteEvent extends CloudFormationCustomResourceEventCommon {}
property PhysicalResourceId
PhysicalResourceId: string;
property RequestType
RequestType: 'Delete';
interface CloudFormationCustomResourceEventCommon
interface CloudFormationCustomResourceEventCommon {}
CloudFormation Custom Resource event and response http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref.html
property LogicalResourceId
LogicalResourceId: string;
property RequestId
RequestId: string;
property ResourceProperties
ResourceProperties: { ServiceToken: string; [Key: string]: any;};
property ResourceType
ResourceType: string;
property ResponseURL
ResponseURL: string;
property ServiceToken
ServiceToken: string;
property StackId
StackId: string;
interface CloudFormationCustomResourceFailedResponse
interface CloudFormationCustomResourceFailedResponse extends CloudFormationCustomResourceResponseCommon {}
interface CloudFormationCustomResourceResponseCommon
interface CloudFormationCustomResourceResponseCommon {}
property Data
Data?: | { [Key: string]: any; } | undefined;
property LogicalResourceId
LogicalResourceId: string;
property NoEcho
NoEcho?: boolean | undefined;
property PhysicalResourceId
PhysicalResourceId: string;
property RequestId
RequestId: string;
property StackId
StackId: string;
interface CloudFormationCustomResourceSuccessResponse
interface CloudFormationCustomResourceSuccessResponse extends CloudFormationCustomResourceResponseCommon {}
interface CloudFormationCustomResourceUpdateEvent
interface CloudFormationCustomResourceUpdateEvent extends CloudFormationCustomResourceEventCommon {}
property OldResourceProperties
OldResourceProperties: { [Key: string]: any;};
property PhysicalResourceId
PhysicalResourceId: string;
property RequestType
RequestType: 'Update';
interface CloudFrontCustomOrigin
interface CloudFrontCustomOrigin {}
property customHeaders
customHeaders: CloudFrontHeaders;
property domainName
domainName: string;
property keepaliveTimeout
keepaliveTimeout: number;
property path
path: string;
property port
port: number;
property protocol
protocol: 'http' | 'https';
property readTimeout
readTimeout: number;
property sslProtocols
sslProtocols: string[];
interface CloudFrontEvent
interface CloudFrontEvent {}
property config
config: { readonly distributionDomainName: string; readonly distributionId: string; readonly eventType: | 'origin-request' | 'origin-response' | 'viewer-request' | 'viewer-response'; readonly requestId: string;};
interface CloudFrontFunctionsCookies
interface CloudFrontFunctionsCookies {}
See Also
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html#functions-event-structure-query-header-cookie
index signature
[key: string]: { value: string; attributes?: string; multiValue?: Array<{ value: string; attributes?: string }>;};
interface CloudFrontFunctionsEvent
interface CloudFrontFunctionsEvent {}
See Also
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html
export const handler = async (event: CloudFrontFunctionsEvent) => {var response = event.response;var headers = response.headers;// Set the cache-control headerheaders["cache-control"] = { value: "public,max-age=31536000,immutable" };// Return response to viewersreturn response};
property context
context: { /** The CloudFront domain name (for example, d111111abcdef8.cloudfront.net) of the distribution that’s associated with the event. */ distributionDomainName: string; /** The ID of the distribution (for example, EDFDVBD6EXAMPLE) that’s associated with the event. */ distributionId: string; /** The event type, either `viewer-request` or `viewer-response`. */ eventType: 'viewer-request' | 'viewer-response'; /** A string that uniquely identifies a CloudFront request (and its associated response). */ requestId: string;};
## Context object The
context
object contains contextual information about the event. It includes the following fields: -distributionDomainName
-distributionId
-eventType
-requestId
property request
request: { /** The HTTP method of the request. If your function code returns a `request`, it cannot modify this field. This is the only read-only field in the `request` object. */ method: string; /** * The relative path of the requested object. If your function modifies the `uri value, note the following: * - The new `uri` value must begin with a forward slash (`/`)`. * - When a function changes the `uri` value, it changes the object that the viewer is requesting. * - When a function changes the `uri` value, it doesn’t change the cache behavior for the request or the origin that an origin request is sent to. */ uri: string; /** * An object that represents the query string in the request. If the request doesn’t include a query string, * the `request` object still includes an empty `querystring` object. * * The `querystring` object contains one field for each query string parameter in the request. * Query string parameter names are converted to lowercase. */ querystring: CloudFrontFunctionsQuerystring; /** * An object that represents the HTTP headers in the request. If the request contains any `Cookie` headers, * those headers are not part of the `headers` object. Cookies are represented separately in the `cookies` object. * * The `headers` object contains one field for each header in the request. Header names are converted to lowercase. */ headers: CloudFrontFunctionsHeaders; /** * An object that represents the cookies in the request (`Cookie` headers). * * The `cookies` object contains one field for each cookie in the request. Cookie names are converted to lowercase. */ cookies: CloudFrontFunctionsCookies;};
## Request object The
request
object contains a representation of a viewer-to-CloudFront HTTP request. In theevent
object that’s passed to your function, therequest
object represents the actual request that CloudFront received from the viewer.If your function code returns a
request
object to CloudFront, it must use this same structure.The
request
object contains the following fields: -method
-uri
-querystring
-headers
-cookies
property response
response: { /** * The HTTP status code of the response. This value is an integer, not a string. * * If the function is associated with a _viewer response_ event type, your function code cannot change * the `statusCode` that it received. If the function is associated with a _viewer request_ event type * and [generates an HTTP response](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html#function-code-generate-response), * your function code can set the `statusCode`. */ statusCode: number; /** The HTTP status description of the response. If your function code generates a response, this field is optional. */ statusDescription?: string; /** * An object that represents the HTTP headers in the response. If the response contains any `Set-Cookie` headers, * those `headers` are not part of the headers object. Cookies are represented separately in the `cookies` object. * * The `headers` object contains one field for each header in the response. Header names are converted to lowercase. */ headers: CloudFrontFunctionsHeaders; /** * An object that represents the cookies in the response (`Set-Cookie` headers). * The `cookies` object contains one field for each cookie in the response. Cookie names are converted to lowercase. */ cookies: CloudFrontFunctionsCookies;};
## Response object
The
response
object contains a representation of a CloudFront-to-viewer HTTP response. In theevent
object that’s passed to your function, theresponse
object represents CloudFront’s actual response to a viewer request.If your function code returns a
response
object, it must use this same structure.The
response
object contains the following fields:
property version
version: string;
## Version field The version field contains a string that specifies the version of the CloudFront Functions event object. The current version is 1.0.
property viewer
viewer: { ip: string;};
## Viewer object The
viewer
object contains anip
field whose value is the IP address of the viewer (client) that sent the request. If the viewer request came through an HTTP proxy or a load balancer, the value is the IP address of the proxy or load balancer.
interface CloudFrontFunctionsHeaders
interface CloudFrontFunctionsHeaders {}
See Also
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html#functions-event-structure-query-header-cookie
index signature
[key: string]: { value: string; multiValue?: Array<{ value: string }> };
interface CloudFrontFunctionsQuerystring
interface CloudFrontFunctionsQuerystring {}
See Also
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html#functions-event-structure-query-header-cookie
index signature
[key: string]: { value: string; multiValue?: Array<{ value: string }> };
interface CloudFrontHeaders
interface CloudFrontHeaders {}
CloudFront events http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html Bear in mind that the "example" event structure in the page above includes both an S3 and a Custom origin, which is not strictly allowed. Only one of these per event may be present.
index signature
[name: string]: Array<{ key?: string | undefined; value: string;}>;
interface CloudFrontRequest
interface CloudFrontRequest {}
property body
body?: | { action: 'read-only' | 'replace'; data: string; encoding: 'base64' | 'text'; readonly inputTruncated: boolean; } | undefined;
property clientIp
readonly clientIp: string;
property headers
headers: CloudFrontHeaders;
property method
readonly method: string;
property origin
origin?: CloudFrontOrigin | undefined;
property querystring
querystring: string;
property uri
uri: string;
interface CloudFrontRequestEvent
interface CloudFrontRequestEvent {}
CloudFront viewer request or origin request event
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#lambda-event-structure-request
property Records
Records: CloudFrontRequestEventRecord[];
interface CloudFrontRequestEventRecord
interface CloudFrontRequestEventRecord {}
property cf
cf: CloudFrontEvent & { request: CloudFrontRequest;};
interface CloudFrontResponse
interface CloudFrontResponse {}
property headers
headers: CloudFrontHeaders;
property status
status: string;
property statusDescription
statusDescription: string;
interface CloudFrontResponseEvent
interface CloudFrontResponseEvent {}
CloudFront viewer response or origin response event
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#lambda-event-structure-response
property Records
Records: Array<{ cf: CloudFrontEvent & { readonly request: Pick< CloudFrontRequest, Exclude<keyof CloudFrontRequest, 'body'> >; response: CloudFrontResponse; };}>;
interface CloudFrontResultResponse
interface CloudFrontResultResponse {}
Generated HTTP response in viewer request event or origin request event
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-generating-http-responses-in-requests.html#lambda-generating-http-responses-object
property body
body?: string | undefined;
property bodyEncoding
bodyEncoding?: 'text' | 'base64' | undefined;
property headers
headers?: CloudFrontHeaders | undefined;
property status
status: string;
property statusDescription
statusDescription?: string | undefined;
interface CloudFrontS3Origin
interface CloudFrontS3Origin {}
property authMethod
authMethod: 'origin-access-identity' | 'none';
property customHeaders
customHeaders: CloudFrontHeaders;
property domainName
domainName: string;
property path
path: string;
property region
region: string;
interface CloudWatchLogsDecodedData
interface CloudWatchLogsDecodedData {}
property logEvents
logEvents: CloudWatchLogsLogEvent[];
property logGroup
logGroup: string;
property logStream
logStream: string;
property messageType
messageType: string;
property owner
owner: string;
property subscriptionFilters
subscriptionFilters: string[];
interface CloudWatchLogsEvent
interface CloudWatchLogsEvent {}
See http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-cloudwatch-logs
property awslogs
awslogs: CloudWatchLogsEventData;
interface CloudWatchLogsEventData
interface CloudWatchLogsEventData {}
property data
data: string;
interface CloudWatchLogsLogEvent
interface CloudWatchLogsLogEvent {}
See http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#LambdaFunctionExample
property extractedFields
extractedFields?: CloudWatchLogsLogEventExtractedFields | undefined;
property id
id: string;
property message
message: string;
property timestamp
timestamp: number;
interface CloudWatchLogsLogEventExtractedFields
interface CloudWatchLogsLogEventExtractedFields {}
index signature
[name: string]: string | undefined;
interface CodeBuildCloudWatchStateEvent
interface CodeBuildCloudWatchStateEvent extends EventBridgeEvent< 'CodeBuild Build State Change', CodeBuildStateEventDetail > {}
property source
source: 'aws.codebuild';
interface CodeBuildStateEventDetail
interface CodeBuildStateEventDetail {}
property "additional-information"
'additional-information': { cache: { type: CodeBuildCacheType; }; 'build-number': number; 'timeout-in-minutes': number; 'build-complete': boolean; initiator: string; 'build-start-time': string; source: { buildspec: string; location: string; type: CodeBuildSourceLocationType; }; 'source-version': string; artifact: { location: string; }; environment: { image: string; 'privileged-mode': boolean; 'image-pull-credentials-type'?: | CodeBuildEnvironmentPullCredentialsType | undefined; 'compute-type': CodeBuildEnvironmentComputeType; type: CodeBuildEnvironmentType; 'environment-variables': Array<{ name: string; type?: CodeBuildEnvironmentVariableType | undefined; value: string; }>; }; 'project-file-system-locations': []; logs: { 'group-name': string; 'stream-name': string; 'deep-link': string; }; phases: Array<{ 'phase-context'?: string[] | undefined; // Not available for COMPLETED phase-type 'start-time': string; 'end-time'?: string | undefined; // Not available for COMPLETED phase-type 'duration-in-seconds'?: number | undefined; // Not available for COMPLETED phase-type 'phase-type': CodeBuildPhaseType; 'phase-status'?: CodeBuildPhaseStatusType | undefined; // Not available for COMPLETED phase-type }>; 'queued-timeout-in-minutes': number;};
property "build-id"
'build-id': string;
property "build-status"
'build-status': CodeBuildStateType;
property "current-phase-context"
'current-phase-context': string;
property "current-phase"
'current-phase': CodeBuildPhaseType;
property "project-name"
'project-name': string;
property version
version: string;
interface CodeCommitTrigger
interface CodeCommitTrigger {}
CodeCommit events https://docs.aws.amazon.com/lambda/latest/dg/services-codecommit.html
property awsRegion
awsRegion: string;
property codecommit
codecommit: { references: Array<{ commit: string; created?: boolean; deleted?: boolean; ref: string; }>;};
property customData
customData?: string;
property eventId
eventId: string;
property eventName
eventName: string;
property eventPartNumber
eventPartNumber: number;
property eventSource
eventSource: string;
property eventSourceARN
eventSourceARN: string;
property eventTime
eventTime: string;
property eventTotalParts
eventTotalParts: number;
property eventTriggerConfigId
eventTriggerConfigId: string;
property eventTriggerName
eventTriggerName: string;
property eventVersion
eventVersion: string;
property userIdentityARN
userIdentityARN: string;
interface CodeCommitTriggerEvent
interface CodeCommitTriggerEvent {}
property Records
Records: CodeCommitTrigger[];
interface CodePipelineCloudWatchActionEvent
interface CodePipelineCloudWatchActionEvent {}
property "detail-type"
'detail-type': 'CodePipeline Action Execution State Change';
property account
account: string;
property detail
detail: { pipeline: string; version: number; 'execution-id': string; stage: string; action: string; state: CodePipelineActionState; type: { owner: 'AWS' | 'Custom' | 'ThirdParty'; category: