-
Notifications
You must be signed in to change notification settings - Fork 7
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
Blog: lambda + HTTP #146
Blog: lambda + HTTP #146
Conversation
❌ Deploy Preview for juxt-website failed.
|
src/pages/blog/http-and-lambda.mdx
Outdated
4. What happens if an exception is thrown? | ||
5. What other quirks are there? | ||
|
||
For the most part I can link you to the relevant part of the docs, but for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swap for 'relevant section' to avoid repetition of 'part' ?
src/pages/blog/http-and-lambda.mdx
Outdated
5. What other quirks are there? | ||
|
||
For the most part I can link you to the relevant part of the docs, but for | ||
some I needed to run some tests. The tests I ran were: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'but for some questions I needed to run some tests a few experiments'? again to avoid repetition of 'some', but also 'test' has a more specific meaning that you probably don't mean to imply here
'The tests I experiment with were:' (if you want to match up the language)
src/pages/blog/http-and-lambda.mdx
Outdated
(See my [last post](https://juxt.pro/blog/plain-clojure-lambda) for how I set | ||
the project up) | ||
|
||
Please note that the input is **not** parsed, so any errors that come parsing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'come from parsing'?
src/pages/blog/http-and-lambda.mdx
Outdated
| Invalid JSON response | `curl -v -XPOST --data '{}' --header 'Test: invalid' <url under test>` | | ||
| Exception thrown | `curl -v -XPOST --data '{}' --header 'Test: error' <url under test>` | | ||
|
||
And the code I used to setup the lambda was: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Clojure code' (for the unfamiliar 🙂 )
src/pages/blog/http-and-lambda.mdx
Outdated
|
||
Please note that the input is **not** parsed, so any errors that come parsing | ||
the input come from AWS. Also note that the output does not conform to any of | ||
the formats required, this tests how each option behaves in this case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% clear what this last sentence is saying. input
is shown in the code but 'the output', 'the formats', 'each option' and 'this case' all feel slightly ambiguous.
src/pages/blog/http-and-lambda.mdx
Outdated
| Invalid JSON request | `200` | `{}` | The JSON formatted request | | ||
| Invalid JSON response | `200` | `{` | The JSON formatted request | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it worth calling these out as surprising? (were they surprising to you?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: Maybe it's worth talking about what my initial expectations were in general for all these services?
src/pages/blog/http-and-lambda.mdx
Outdated
|
||
## API Gateway w/ HTTP API | ||
|
||
HTTP APIs are API Gateway's simplest option, which is reflected in it's setup: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider re-phrasing to intro API Gateway a little more (since it's not been mentioned for quite a while by this point), e.g. 'The API Gateway method presents a few options, but using HTTP APIs is the simplest option`
src/pages/blog/http-and-lambda.mdx
Outdated
- [Create your HTTP API](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop.html) | ||
- For **Integrations** select **lambda** | ||
- For **Lambda function** choose your lambda | ||
- See [here](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) setting up a custom domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'for setting up'?
src/pages/blog/http-and-lambda.mdx
Outdated
|
||
The [request](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.proxy-format-structure) | ||
and [response](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.v2) | ||
formats seem to be identical to Function URLs, also similarly to Function URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'. Also similarly [...]' (full-stop, new sentence)
src/pages/blog/http-and-lambda.mdx
Outdated
- Choose **New API** instead of **Example API** | ||
- [Create your Lambda Integration](https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-rest-new-console.html#getting-started-rest-new-console-create-integration) | ||
- Keep **Lambda Proxy Integration** turned off (that's the next section) | ||
- See [here](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) setting up a custom domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'for setting up'?
2116735
to
c6ca5bf
Compare
A blog that attempts to divulge the things I've learnt while trying to call lambda over HTTP recently