Skip to content

Commit

Permalink
remove HttpIntegrationType.LAMBDA_PROXY
Browse files Browse the repository at this point in the history
  • Loading branch information
jogold committed Jan 12, 2022
1 parent acf7c0c commit 803c8e1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export class HttpLambdaIntegration extends HttpRouteIntegration {
});

return {
type: HttpIntegrationType.LAMBDA_PROXY,
type: HttpIntegrationType.AWS_PROXY,
uri: this.handler.functionArn,
payloadFormatVersion: this.props.payloadFormatVersion ?? PayloadFormatVersion.VERSION_2_0,
parameterMapping: this.props.parameterMapping,
};
}
}
}
25 changes: 16 additions & 9 deletions packages/@aws-cdk/aws-apigatewayv2/lib/http/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,25 @@ export interface IHttpIntegration extends IIntegration {
*/
export enum HttpIntegrationType {
/**
* Integration type is a Lambda proxy
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
*/
LAMBDA_PROXY = 'AWS_PROXY',
/**
* Integration type is an HTTP proxy
* Integration type is an HTTP proxy.
*
* For integrating the route or method request with an HTTP endpoint, with the
* client request passed through as-is. This is also referred to as HTTP proxy
* integration. For HTTP API private integrations, use an HTTP_PROXY integration.
*
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html
*/
HTTP_PROXY = 'HTTP_PROXY',

/**
* Integration type is an AWS proxy
* Integration type is an AWS proxy.
*
* For integrating the route or method request with a Lambda function or other
* AWS service action. This integration is also referred to as a Lambda proxy
* integration.
*
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
*/
AWS_PROXY = 'AWS_PROXY',
}
Expand Down Expand Up @@ -174,7 +181,7 @@ export interface HttpIntegrationProps {

/**
* Integration URI.
* This will be the function ARN in the case of `HttpIntegrationType.LAMBDA_PROXY`,
* This will be the function ARN in the case of `HttpIntegrationType.AWS_PROXY`,
* or HTTP URL in the case of `HttpIntegrationType.HTTP_PROXY`.
*
* @default - none, required if no `integrationSubtype` is defined.
Expand Down Expand Up @@ -204,7 +211,7 @@ export interface HttpIntegrationProps {
/**
* The version of the payload format
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
* @default - defaults to latest in the case of HttpIntegrationType.LAMBDA_PROXY`, irrelevant otherwise.
* @default - defaults to latest in the case of HttpIntegrationType.AWS_PROXY`, irrelevant otherwise.
*/
readonly payloadFormatVersion?: PayloadFormatVersion;

Expand Down

0 comments on commit 803c8e1

Please sign in to comment.