Configuring API Gateway

If you deploy CloudFormation stack, Lambda functions and API Gateway have already been made. You should put required part of these resources.

Configuring API Gateway

We know that one of our Lambda functions requires API Gateway. API Gateway provides endpoint for REST API, HTTP API and WebSocket API. It also has features like API caching, Throttling and operational benefits on API backend.

It plays a role of “Gateway” for Backend Lambda API on this Lab.

  1. Move API Gateway menu on Console. (https://console.aws.amazon.com/apigateway)

  2. Click “Create API”, select REST and set its name “GomokuAPI”. Endpoint should be Regional.

APIGW

  1. Creating API, you can find empty page. Firstly, make Resource and create Method on it. Click “Actions” button and make Resource.

  2. Put ranking as Resource Name, and Enable API Gateway CORS. Click “Create Resource”.

APIGW

  1. Next step is creating method. Click “Actions” button and Create Method. You can see small list box below. Select “GET” and click check buttons next to it.

  2. Choose Integration Type Lambda Function, and right region. Select game-rank-reader as Lambda Function. Click Save.

APIGW

  1. API was made. Now we should deploy this API to production stage. Click “Actions” and “Deploy API”.

  2. Select [New Stage] and put Stage name “prod”. Click Deploy button to proceed.

APIGW

  1. After completion, you can check stage configuration like below. Please check this Invoke URL. We are using this URL as endpoint for S3 static web page.

APIGW

Nextly, we are making static web site built on S3. You can easily host static web site!