Is there any way to setup basic-auth for HTTP API Gateway?

Is there any way to setup basic-auth for HTTP API Gateway? Is it possible to setup it?

Hi bro,
Hope you doing well today! It’s not possible to setup basic-auth for HTTP API Gateway.
If you want a basic authentication Lambda Authorizer will be able to handle the basic authentication and it should be created in a way such that it performs authentication and validates them with the Lambda.
Setting up basic auth for REST APIs can be done easily because of the support of Gateway Responses which are automatically selected by the API Gateway based on the authorizer response. But unfortunately there seems to be no way of customizing that with HTTP APIs. So the workaround for basic auth with HTTP APIs is to use a Lambda Authorizer to perform any type of authentication and validate them with the lambda.
This being said, if you want to configure complete Basic Auth functionality on API Gateway including returning 401 unauthorized status and WWW-Authenticate : Basic header and verifying credentials passed with Authorization: Basic header then you can use this workaround[+] for REST APIs, this workaround uses Gateway responses to return 401 unauthorized status and WWW-Authenticate : Basic header but in case of HTTP API, Gateway response is not yet supported that is why it’s not possible to use this workaround with HTTP APIs.
You can check feature are supported for HTTP API and consider choosing between REST APIs and HTTP APIs