Skip to content

Latest commit

 

History

History
 
 

gateway

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

API Gateways

Try to configure the API Gateway yourself using the knowledge from the recent module. Tips can be seen below.

CORS Settings

Cross-Origin request settings. Please note that both GET and POST requests (to record a vote and get results) are allowed, and two request sources are connected: my-vote (voting) and my-vote-result (results).

Notice how accepted origins are not s3 buckets - but only 2 cloudfronts!

Screenshot_8

Routes

In this example, I used one path /my-vote, and made the routing based on the request method GET/POST. This is not mandatory, you can do two different ways.

Screenshot_40

Integrations

This API must support two functions from AWS Lambda as integrations. This repository contains their code: