fixed typos

This commit is contained in:
Eslam A. Hefnawy 2016-07-26 17:01:56 +09:00
parent 5157467074
commit 6ec13b48a4
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ resources:
```
### Example custom resources - HTTP Proxy
As a practical example for adding a custom resource to your service, we're going to demonstrate how you can create an API Gateway HTTP proxy using Cloud Formation templates/resources.
As a practical example for adding a custom resource to your service, we're going to demonstrate how you can create an API Gateway HTTP proxy using CloudFormation templates/resources.
To set up an HTTP proxy, you'll need two CloudFormation templates, one for the endpoint (known as resource in CF), and one for method. These two templates will work together to construct your proxy. So if you want to set `your-app.com/serverless` as a proxy for `serverless.com`, you'll need the following two templates in your `serverless.yaml`:
@ -39,6 +39,7 @@ service: service-name
provider: aws
functions:
...
resources:
Resources:
ProxyResource:
@ -76,7 +77,6 @@ resources:
ResponseParameters: {}
ResponseTemplates:
application/json: ""
```
There's a lot going on in these two templates, but all you need to know to set up a simple proxy is setting the method & endpoint of your proxy, and the URI you want to set a proxy to.

View File

@ -121,4 +121,4 @@ functions:
```
### Setting an HTTP proxy on API Gateway
Setting an API Gateway proxy can easily be done by adding two custom Cloud Formation resource templates to your `serverless.yaml` file. [Check this guide for more info on how to set up a proxy using custom CloudFormation resources in `serverless.yaml`](https://github.com/serverless/serverless/blob/v1.0/docs/guide/custom-provider-resources.md).
Setting an API Gateway proxy can easily be done by adding two custom CloudFormation resource templates to your `serverless.yaml` file. [Check this guide for more info on how to set up a proxy using custom CloudFormation resources in `serverless.yaml`](https://github.com/serverless/serverless/blob/v1.0/docs/guide/custom-provider-resources.md).