Add CloudFormation template to deploy signed API #122
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #84
Rationale
Because we already have a pusher CF template it makes sense to also base the signed API deployment on that. The signed API needs to be accessible from outside, which means it needs more configuration. Notably, we need load balancer and two subnets (AWS requires subnets in at least two zones). I read a bit about best practices and the final result is similar to this nicely written article (sidenote: I couldn't make their example work).
I verified the deployment by deploying both Pusher and Signed API on AWS, see this commit. The API is accessible here (but will be killed in some time).
Removal of port
Because we need to configure the load balancer to forward incoming requests to the service we need to know the port number. However, the port number of signed API is configurable. This is arguably confusing because when the service is run inside docker, users can re-publish to any port number on the host machine. Configuring port is then only useful for development server, which we can fix separately. So in short, we hardcode the port number of signed API in docker to port 80.
Other remarks