'Response "The action deploy is not valid for this web service" is coming when using api gateway

I am using API gateway for an API deployed in ec2 instance. I am getting

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Errors><Error>
<Code>InvalidAction</Code>
<Message>The action deploy is not valid for this web service.</Message>
</Error></Errors>
<RequestID>b1e15e37-99a8-48ac-be69-9d1d8b7f6336</RequestID>
</Response>

with status: 200. But it should return "success" as output. I have no idea why i am getting this output when i do a get request on the API endpoint.

{"Success"}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source