{"id":1032,"date":"2023-01-14T10:55:23","date_gmt":"2023-01-14T10:55:23","guid":{"rendered":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/aws-certified-developer-associate-dva-c01-question057\/"},"modified":"2023-01-14T10:55:23","modified_gmt":"2023-01-14T10:55:23","slug":"aws-certified-developer-associate-dva-c01-question057","status":"publish","type":"post","link":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/aws-certified-developer-associate-dva-c01-question057\/","title":{"rendered":"AWS Certified Developer Associate DVA-C01 &#8211; Question057"},"content":{"rendered":"<div class=\"question\">A developer is debugging an AWS Lambda function behind an Amazon API Gateway. Whenever the API Gateway endpoint is called, HTTP status code 200 is returned even though AWS Lambda is recording a 4xx error.<br \/>\nWhat change needs to be made to return a proper error code through the API Gateway?<br \/><strong><br \/>A.<\/strong> Enable CORS in the API Gateway method settings<br \/><strong>B.<\/strong> Use a Lambda proxy integration to return HTTP codes and headers<br \/><strong>C.<\/strong> Enable API Gateway error pass-through.<br \/><strong>D.<\/strong> Return the value in the header x-Amzn-ErrorType.<\/div>\n<p><\/p>\n<style> .hidden-div{ display:none } <\/style>\n<p>\t\t\t\t\t\t\t<button onclick=\"getElementById('hidden-div').style.display = 'block'\"> Show Answer <\/button> <button onclick=\"getElementById('hidden-div').style.display = 'none'\">Hide Answer<\/button><\/p>\n<div class=\"hidden-div\" id=\"hidden-div\"><span style=\"\"><\/p>\n<div class=\"answer\">Correct Answer: <strong>A<\/strong><\/div>\n<p><strong>Explanation:<\/strong> <\/p>\n<div class=\"explanation\">\nReference: <a href=\"https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/how-to-cors.html\" title=\"External link\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/how-to&#8230;<\/a><\/div>\n<p><\/strong><\/span> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>A developer is debugging an AWS Lambda function behind an Amazon API Gateway. Whenever the API Gateway endpoint is called, HTTP status code 200 is returned even though AWS Lambda is recording a 4xx error. What change needs to be made to return a proper error code through the API Gateway?A. Enable CORS in the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3,60],"class_list":["post-1032","post","type-post","status-publish","format-standard","hentry","category-aws-certified-developer-associate-dva-c01","tag-aws-certified-developer-associate-dva-c01","tag-question-057"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/posts\/1032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/comments?post=1032"}],"version-history":[{"count":0,"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/posts\/1032\/revisions"}],"wp:attachment":[{"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/media?parent=1032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/categories?post=1032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exampracticetests.com\/aws\/Developer_Associate_DVA-C01\/wp-json\/wp\/v2\/tags?post=1032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}