Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build lambda gateway #9

Closed
2 tasks
barlock opened this issue Nov 28, 2018 · 1 comment
Closed
2 tasks

Build lambda gateway #9

barlock opened this issue Nov 28, 2018 · 1 comment
Assignees

Comments

@barlock
Copy link
Contributor

barlock commented Nov 28, 2018

Overview

As a user I want to access a fast website with a nice domain

Reference

Assumptions

  • Koa server deployed via AWS Lambda
  • Use SAM for deployments

Acceptance

Tasks

  • Build and test server function
  • Stand up prod instance
@barlock barlock modified the milestones: MVP, Sprint - 12/7 Nov 28, 2018
This was referenced Dec 5, 2018
@barlock barlock self-assigned this Dec 12, 2018
@barlock
Copy link
Contributor Author

barlock commented Dec 14, 2018

Notes

  • SSL is going to be hard. ACM only supports certs one level deep *.eth.soy so all nested subdomains will be http only.
    • Custom domain names are even harder. Need install cert on the server somehow... encrypt with public key and store on blockchain?
    • It could be possible to do something fancy with let's encrypt on first request to install a cert
  • Lambda is super slow not even counting warmup. To get the lambda running with certs behind it for a wildcard, you need to put it behind of a cloud front distribution. The cloudfront distribution doesn't forward the host...
  • Using just lambda at edge seems to work pretty quick all around, likely 3X more expensive to run.
  • Distributions w/lambdas (edge) seem more finikey than simply updating a fn. Logs vanish, hard to run locally

Thoughts
It's likely possible to do let's encrypt stuff with a lambda so I don't need to jump for a k8s cluster just yet.

  • I should check the performance of edge vs regular lambda + cloudfront with regular lambda being preferable for logs.
  • Edge lambda makes the most 'sense' as I'll need one anyway to forward hosts, but simplicity here with logs and debugging would be better with a regular one and a forwarder,
  • if using regular + edge to forward host, I must add x-forwarded-host as a cache key <-- check to see how easy this is or just use edge lambda

Cloudformation is a PITA with distributions as it waits for full deployment which can take a while. Also, not sure how to fix a rolled back stack without deploying a new one? I think Terraform doesn't wait? I need to see about setting it up.

Debugging lambda@edge

@barlock barlock changed the title Hold: Build lambda gateway Build lambda gateway Dec 14, 2018
@barlock barlock closed this as completed Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant