Skip to content

Commit 7442e70

Browse files
authored
Update README.md
1 parent d306910 commit 7442e70

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<img src="https://avatars.githubusercontent.com/u/132536224" width=300 >
22

3-
# chDB AWS Lambda
3+
# chDB in AWS Lambda
44

5-
> Running chdb in a lambda container function for fun a profit!
5+
> Running chdb in a lambda container function
66
7+
This sample shows how to run the chdb OLAP engine in an AWS Lambda function to enable ad-hoc querying of any cloud dataset with ClickHouse SQL using a simple HTTP client, without the need to run or deploy a ClickHouse cluster or dedicated cloud service.
78

9+
![image](https://github.com/chdb-io/chdb-lambda/assets/1423657/a5484b39-9aa7-4c35-a55c-be6329a30ace)
810

911

1012
## Create an AWS Lambda Function for chDB
@@ -57,21 +59,19 @@ $ ./deploy.sh
5759

5860
Let's **test** our new **chDB Lambda** using a *simple query.*
5961

60-
The Lamba expects JSON requests with a **query** key:
62+
The Lamba expects JSON POST requests with a **query** key:
6163

6264

6365
```bash
64-
curl -XPOST "http://{lambda_url}/2015-03-31/functions/function/invocations" -d
65-
{
66-
'query': 'SELECT version()',
67-
'default_format': 'CSV'
68-
}
66+
curl -XPOST "http://{lambda_url}/query" \
67+
--header 'Content-Type: application/json'
68+
--data '{"query": "SELECT version()", "default_format": "CSV"}'
6969
```
7070

7171
And the response would look like this (or any other format)
7272

7373
```plaintext
74-
22.12.1.1
74+
23.6.1.1
7575
```
7676

7777
You can also use the Browser and the AWS Console to generate **test events**:
@@ -80,8 +80,7 @@ You can also use the Browser and the AWS Console to generate **test events**:
8080

8181
<br>
8282

83-
-----
84-
8583
<br>
8684

87-
This guide is loosely based on [this reference article](https://medium.com/@skalyani103/python-on-aws-lambda-using-docker-images-5740664c54ca)
85+
-----
86+

0 commit comments

Comments
 (0)