API gateway dynamic xml json response

0

Creating a AWS API gateway rest api using vpc link integration in which I will pass the request as json always, and based on the return content-type either xml or json, need to return the API response accordingly. Please suggest what integration response and method response configuration is required.

1 Answer
0

Hi,

Please suggest what integration response and method response configuration is required.

It is highly dependent on your backend implementation and it is difficult to get a correct answer without the knowledge of your architecture and requirements. If your backend is HTTP, there is a HTTP proxy integration and HTTP non-proxy integration (a.k.a. custom integration). If your backend is Lambda, there are Lambda proxy integration, and Lambda non-proxy integration. If your backend is one of AWS services (e.g., SQS, Step Functions), then use AWS integration. You can find some insights from those tutorial.

Again, which integration response and method response should be configured is based on which integration type you choose, which is highly dependent on your architecture and requirements.

profile picture
HS
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions