Skip to content
v2.274.0

AwsIntegration Class ​

This type of integration lets an API expose AWS service actions.

It is intended for calling all AWS service actions, but is not recommended for calling a Lambda function, because the Lambda custom integration is a legacy technology.

Example ​

ts
const getMessageIntegration = new apigateway.AwsIntegration({
  service: 'sqs',
  path: 'queueName',
  region: 'eu-west-1'
});
python
get_message_integration = apigateway.AwsIntegration(
    service="sqs",
    path="queueName",
    region="eu-west-1"
)
java
AwsIntegration getMessageIntegration = AwsIntegration.Builder.create()
        .service("sqs")
        .path("queueName")
        .region("eu-west-1")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var getMessageIntegration = new AwsIntegration(new AwsIntegrationProps {
    Service = "sqs",
    Path = "queueName",
    Region = "eu-west-1"
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
getMessageIntegration := apigateway.NewAwsIntegration(&AwsIntegrationProps{
	Service: jsii.String("sqs"),
	Path: jsii.String("queueName"),
	Region: jsii.String("eu-west-1"),
})

Initializer ​

ts
new AwsIntegration(props: AwsIntegrationProps)
python
AwsIntegration(props: AwsIntegrationProps)
java
new AwsIntegration(AwsIntegrationProps props)
csharp
new AwsIntegration(AwsIntegrationProps props)
go
NewAwsIntegration(Props AwsIntegrationProps)

Methods ​

bind(method: Method): IntegrationConfigdef bind(self, method: Method) -> IntegrationConfigpublic IntegrationConfig bind(Method method)public IntegrationConfig Bind(Method method)func Bind(Method Method) IntegrationConfig#
Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.