eternitysharp
eternitysharp

Reputation: 559

What is the difference between AWS::Serverless::Api and AWS::Serverless::HttpApi?

What is the difference between AWS::Serverless::Api and AWS::Serverless::HttpApi?

From what I can understand AWS::Serverless::HttpApi seems to configure the HTTP API which can also be configured with AWS::ApiGatewayV2::Api, is this correct?

What does AWS::Serverless::Api configure, is it the old RestAPI which you also can configure through AWS::ApiGateway::RestApi?

Upvotes: 6

Views: 2873

Answers (1)

Marcin
Marcin

Reputation: 238139

Yes, AWS::Serverless::Api configures REST API. AWS::Serverless::Api is a higher level resource then AWS::ApiGateway::RestApi.

For example with just single AWS::Serverless::Api you can define your paths (/test) and their methods (GET). The same using AWS::ApiGateway::RestApi is not possible. You have to separately construct AWS::ApiGateway::Resource and AWS::ApiGateway::Method.

Upvotes: 4

Related Questions