Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 418
eternitysharp Avatar asked Jun 30 '26 04:06

eternitysharp


1 Answers

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.

like image 138
Marcin Avatar answered Jul 04 '26 17:07

Marcin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!