In the APIG, my path is /users with GET method already created using Cloudformation. In my Serverless, i want to create a new POST method under it. How do i do it?
I already tried below but it does not work.
// function.yml
...
events:
- http:
path: /users
method: post
...
// serverless.yml
restApiId: APIG rest id
restApiRootResourceId: APIG root id
restApiResources:
/users: id of my /users
Serverless Error ---------------------------------------
An error occurred: ApiGatewayResourceGeocode - Resource handler returned message: "Another resource with the same parent already has this name: users (Service: ApiGateway, Status Code: 409, Request ID: 9bb3ae3a-a124-4bac-9b70-529ecb88ce2b) (SDK Attempt Count: 1)" (RequestToken: 27dea297-edcb-e5c8-9a24-e3eedf5f2e24, HandlerErrorCode: AlreadyExists).