HTTP POST path variable and request body with Java

Hello everyone.

I am implement POST service using aws lambda with Java and serverless.

My requirement is:

I have URL where there is path variable resource (like this example :{userid}/create) and my request body is { “account”: “serverless”,“account-id”:“123”}

Can you please share me an example in serverless.yml file and what input object i have to use to access body and path variable?

public TestHandler extends requestHandler<Map<String,Object>, Response object) {


Will that work?

Please provide me examples