Skip to content

Commit 93d5d4f

Browse files
committed
update readmme
1 parent 4acf9e1 commit 93d5d4f

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

README.md

+29-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![serverless](http://public.serverless.com/badges/v3.svg)
22

33
# Serverless ApiGateway Service Proxy(BETA)
4-
This Serverless Framewrok plugin supports the AWS service proxy integration feature of API Gateway. You can directly connect API Gateway to AWS services without Lambda. Currently, the plugin only supports Kinesis streams but will expand to other services.
4+
This Serverless Framewrok plugin supports the AWS service proxy integration feature of API Gateway. You can directly connect API Gateway to AWS services without Lambda.
55

66
## Install
77
Run `npm install` in your Serverless project.
@@ -16,6 +16,13 @@ plugins:
1616
- serverless-apigateway-service-proxy
1717
```
1818
19+
## Supported AWS services
20+
Here is a services list which this plugin supports for now. But will expand to other services in the feature.
21+
Please pull request if you are intersted in it.
22+
23+
- Kinesis Streams
24+
- SQS
25+
1926
## How to use
2027
Define settings of the AWS services you want to integrate under `custom > apiGatewayServiceProxy` and run `serverless deploy`.
2128

@@ -29,7 +36,7 @@ custom:
2936
method: post
3037
streamName: { Ref: 'YourStream' }
3138
cors: true
32-
39+
3340
resources:
3441
Resources:
3542
YourStream:
@@ -41,7 +48,26 @@ resources:
4148
Here is a sample request after deploying.
4249
```
4350
curl -XPOST https://xxxxxxx.execute-api.us-east-1.amazonaws.com/dev/kinesis -d '{"Data": "some data","PartitionKey": "some key"}' -H 'Content-Type:application/json'
44-
4551
```
4652
53+
### SQS
54+
Here is syntax for SQS proxy in serverless.yml.
55+
```yaml
56+
custom:
57+
apiGatewayServiceProxy:
58+
- sqs:
59+
path: /sqs
60+
method: post
61+
queueName: {"Fn::GetAtt":[ "SQSQueue", "QueueName" ]}
62+
cors: true
63+
64+
resources:
65+
Resources:
66+
SQSQueue:
67+
Type: "AWS::SQS::Queue"
68+
```
4769

70+
Here is a sample request after deploying.
71+
```
72+
curl -XPOST https://xxxxxx.execute-api.us-east-1.amazonaws.com/dev/sqs -d '{"message": "testtest"}' -H 'Content-Type:application/json'
73+
```

0 commit comments

Comments
 (0)