DVA-C02 - Development with AWS Services - Section 1.4

Write code that interacts with AWS services using AWS SDKs and AWS APIs, and create, extend and maintain APIs with request validation and response transformation.

Use AWS SDKs to call AWS service APIs programmatically and configure Amazon API Gateway with request validation and response transformation to expose clean, typed HTTP interfaces. Recognise how SDK credential resolution, pagination helpers, and error handling differ from raw API calls.

AWS SDKsAmazon API GatewayRequest validationResponse transformation

Practice question for this objective

Free sampleDevelopment with AWS Servicesmedium

A team exposes an Amazon API Gateway REST API with a non-proxy Lambda integration. The client sends a JSON body, but the Lambda function expects a different shape that also injects the caller's source IP and the request time. The team wants API Gateway to reshape the incoming request into the function's expected structure before invocation, without changing the function code. Which API Gateway feature reshapes the request?

  • AA request validator on the method that rewrites the body to the backend shape after confirming it matches the defined JSON Schema model.
  • BA Lambda proxy integration that forwards the raw request unchanged so the function reshapes the body itself at runtime.
  • CA gateway response template that rebuilds the request body and adds the source IP before the integration forwards it on.
  • DA mapping template on the integration request that uses Velocity to build the new JSON body from the input payload and context variables. Correct
Use an API Gateway integration request mapping template to transform an incoming payload into the backend's expected shape using context variables. Non-proxy integrations let API Gateway transform requests. An integration request mapping template written in Velocity reads the input payload plus context variables like source IP and request time and emits a new body matching what the backend expects, all without backend code changes.

Why A is wrong: Validators only accept or reject a request against a schema, so they verify structure but never transform or reshape the payload.

Why B is wrong: Proxy integration passes the request through untouched, which forces code changes in the function and so does not meet the no-code goal.

Why C is wrong: Gateway responses customise error replies sent back to clients, not the request sent to a backend, so they cannot reshape an incoming body.

Why D is correct: Integration request mapping templates transform the incoming payload into the backend shape and can pull in context values such as source IP and request time.

See more DVA-C02 practice questions, answers explained.

More in this domain

Back to all Development with AWS Services objectives, or the DVA-C02 cert hub.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.