Skip to content

Commit cc68b5c

Browse files
Add API Gateway V2 HTTP API sample request
Add a sample request for API Gateway v2 HTTP API requests.
1 parent 0f7b635 commit cc68b5c

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"version": "2.0",
3+
"routeKey": "$default",
4+
"rawPath": "/path/to/resource",
5+
"rawQueryString": "parameter1=value1&parameter1=value2&parameter2=value",
6+
"cookies": [ "cookie1", "cookie2" ],
7+
"headers": {
8+
"Header1": "value1",
9+
"Header2": "value2"
10+
},
11+
"queryStringParameters": {
12+
"parameter1": "value1,value2",
13+
"parameter2": "value"
14+
},
15+
"requestContext": {
16+
"accountId": "123456789012",
17+
"apiId": "api-id",
18+
"authentication": {
19+
"clientCert": {
20+
"clientCertPem": "CERT_CONTENT",
21+
"subjectDN": "www.example.com",
22+
"issuerDN": "Example issuer",
23+
"serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1",
24+
"validity": {
25+
"notBefore": "May 28 12:30:02 2019 GMT",
26+
"notAfter": "Aug 5 09:36:04 2021 GMT"
27+
}
28+
}
29+
},
30+
"authorizer": {
31+
"jwt": {
32+
"claims": {
33+
"claim1": "value1",
34+
"claim2": "value2"
35+
},
36+
"scopes": [ "scope1", "scope2" ]
37+
}
38+
},
39+
"domainName": "id.execute-api.us-east-1.amazonaws.com",
40+
"domainPrefix": "domain-id",
41+
"http": {
42+
"method": "POST",
43+
"path": "/path/to/resource",
44+
"protocol": "HTTP/1.1",
45+
"sourceIp": "IP",
46+
"userAgent": "agent"
47+
},
48+
"requestId": "request-id",
49+
"routeId": "route-id",
50+
"routeKey": "$default-route",
51+
"stage": "$default-stage",
52+
"time": "12/Mar/2020:19:03:58 +0000",
53+
"timeEpoch": 1583348638390
54+
},
55+
"body": "Hello from Lambda",
56+
"pathParameters": { "parameter1": "value1" },
57+
"isBase64Encoded": false,
58+
"stageVariables": {
59+
"stageVariable1": "value1",
60+
"stageVariable2": "value2"
61+
}
62+
}

Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Resources/SampleRequests/manifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
<name>API Gateway AWS Proxy</name>
4444
<filename>aws-proxy.json</filename>
4545
</request>
46+
<request category="AWS">
47+
<name>API Gateway V2 HTTP API</name>
48+
<filename>http-api-v2-request.json</filename>
49+
</request>
4650
<request category="AWS">
4751
<name>AWS Batch Get Job Request</name>
4852
<filename>batch-get-job.json</filename>

0 commit comments

Comments
 (0)