01. Goto API gateway in AWS console.
select APIs --> Create API
02. select REST API click on --> Build
03. select New API --> give name --> select endpoint type which you need --> click on
Create API.
04. API will be created and redirected to the page.
05. place the cursor on '/' below create resource. click on create resource.
give the resource name of the service example: accounts and create resources.
06. place the cursor on 'accounts' click again on create resource.
01. toggle the proxy resource.
02. enter this in {proxy+} resource path. then create resources.
07. Back to resources. place the cursor on /{proxy+}
08. click on ANY from the right side Methods option.
09. scroll down click on Edit integration.
10. select HTTP Proxy
11. toggle the HTTP proxy above the HTTP method.
12. Give service URL in Endpoint URl. with {proxy} like this
example: http://34.230.215.7:31560/{proxy}
13. click on save.
14. place the cursor on ANY method. click on Deploy API
15. a pop up will come with options stages. select *New stage* for creating a new stage.
16. access the provided URL in stages. wait a few minutes API gateway takes to refresh.
17. check if all routings are working fine or not.
18. In a similar way create URl for accessing all backend services from a single point URL.
19. to create more services create the resources on route level '/' with the same name or
service as resource. then create method deploy it to the same stage to access
all services from a single URL.
20. so the single URL will look similar to this.
https://ee04wk2mj9.execute-api.us-east-1.amazonaws.com/stage/
21. you can create more resources and deploy the method and access the multiple services
like this.
https://ee04wk2mj9.execute-api.us-east-1.amazonaws.com/stage/accounts - for
accounts
https://ee04wk2mj9.execute-api.us-east-1.amazonaws.com/stage/dashboard-servie -
for dashboard-servie
https://ee04wk2mj9.execute-api.us-east-1.amazonaws.com/stage/product-service -
product-service
for more information check below links.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-
simple-proxy-for-http.html
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-
proxy.html