the developer receives the following error:Wed Nov 08 01:13:00 UTC 2017 : Method completed with status: 502What should the developer do to resolve the error?
Change the HTTP endpoint of the API to an HTTPS endpoint.
Change the format of the payload sent to the API Gateway.
Change the format of the Lambda function response to the API call.
Change the authorization header in the API call to access the Lambda function.
Explanations:
The issue is not related to the HTTP or HTTPS endpoint. The 502 error typically occurs when the Lambda function is not responding as expected or there is an issue in the API Gateway-Lambda integration.
Changing the payload format does not directly address the 502 error unless the Lambda function expects a different format. The error likely arises from an issue with the Lambda response or execution.
A 502 error from API Gateway usually indicates that the Lambda function is either not responding properly or the response format is incorrect. The response from Lambda must adhere to the expected structure for API Gateway to process it correctly.
Authorization headers affect access control, not the Lambda response format. The 502 error is typically unrelated to authorization or headers.