Skip to content

Commit 2b57d73

Browse files
committed
Added missing test event.json as per README file instructions.
1 parent 81852f1 commit 2b57d73

File tree

2 files changed

+126
-3
lines changed

2 files changed

+126
-3
lines changed

java-test-samples/apigw-lambda-list-s3-buckets/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ To use the SAM CLI, you need the following tools.
4444
Use the following command to build your application locally:
4545

4646
```bash
47-
# build your application locally using a container
48-
apigw-lambda-list-s3-buckets$ sam build --use-container
47+
# build your application locally using a sam
48+
apigw-lambda-list-s3-buckets$ sam build
4949
```
5050
The SAM CLI installs dependencies defined in `apigw-lambda-list-s3-buckets/pom.xml`, creates a deployment package, and saves it in the `.aws-sam/build` folder. [Read the documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-building.html).
5151

5252
> Note:
53-
> If you witness error `Could not find public.ecr.aws/sam/build-java11:latest-x86_64 image locally and failed to pull it from docker` then run `docker logout public.ecr.aws` and rerun `sam build --use-container`
53+
> If you witness error `Could not find public.ecr.aws/sam/build-java11:latest-x86_64 image locally and failed to pull it from docker` then run `docker logout public.ecr.aws` and rerun `sam build`
5454
5555
Use the following commend to deploy your application package to AWS:
5656
``` bash
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"body": "",
3+
"resource": "/{proxy+}",
4+
"path": "/path/to/resource",
5+
"httpMethod": "GET",
6+
"isBase64Encoded": true,
7+
"queryStringParameters": {
8+
"foo": "bar"
9+
},
10+
"multiValueQueryStringParameters": {
11+
"foo": [
12+
"bar"
13+
]
14+
},
15+
"pathParameters": {
16+
"proxy": "/path/to/resource"
17+
},
18+
"stageVariables": {
19+
"baz": "qux"
20+
},
21+
"headers": {
22+
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
23+
"Accept-Encoding": "gzip, deflate, sdch",
24+
"Accept-Language": "en-US,en;q=0.8",
25+
"Cache-Control": "max-age=0",
26+
"CloudFront-Forwarded-Proto": "https",
27+
"CloudFront-Is-Desktop-Viewer": "true",
28+
"CloudFront-Is-Mobile-Viewer": "false",
29+
"CloudFront-Is-SmartTV-Viewer": "false",
30+
"CloudFront-Is-Tablet-Viewer": "false",
31+
"CloudFront-Viewer-Country": "US",
32+
"Host": "1234567890.execute-api.us-east-1.amazonaws.com",
33+
"Upgrade-Insecure-Requests": "1",
34+
"User-Agent": "Custom User Agent String",
35+
"Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)",
36+
"X-Amz-Cf-Id": "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==",
37+
"X-Forwarded-For": "127.0.0.1, 127.0.0.2",
38+
"X-Forwarded-Port": "443",
39+
"X-Forwarded-Proto": "https"
40+
},
41+
"multiValueHeaders": {
42+
"Accept": [
43+
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
44+
],
45+
"Accept-Encoding": [
46+
"gzip, deflate, sdch"
47+
],
48+
"Accept-Language": [
49+
"en-US,en;q=0.8"
50+
],
51+
"Cache-Control": [
52+
"max-age=0"
53+
],
54+
"CloudFront-Forwarded-Proto": [
55+
"https"
56+
],
57+
"CloudFront-Is-Desktop-Viewer": [
58+
"true"
59+
],
60+
"CloudFront-Is-Mobile-Viewer": [
61+
"false"
62+
],
63+
"CloudFront-Is-SmartTV-Viewer": [
64+
"false"
65+
],
66+
"CloudFront-Is-Tablet-Viewer": [
67+
"false"
68+
],
69+
"CloudFront-Viewer-Country": [
70+
"US"
71+
],
72+
"Host": [
73+
"0123456789.execute-api.us-east-1.amazonaws.com"
74+
],
75+
"Upgrade-Insecure-Requests": [
76+
"1"
77+
],
78+
"User-Agent": [
79+
"Custom User Agent String"
80+
],
81+
"Via": [
82+
"1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)"
83+
],
84+
"X-Amz-Cf-Id": [
85+
"cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA=="
86+
],
87+
"X-Forwarded-For": [
88+
"127.0.0.1, 127.0.0.2"
89+
],
90+
"X-Forwarded-Port": [
91+
"443"
92+
],
93+
"X-Forwarded-Proto": [
94+
"https"
95+
]
96+
},
97+
"requestContext": {
98+
"accountId": "123456789012",
99+
"resourceId": "123456",
100+
"stage": "prod",
101+
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef",
102+
"requestTime": "09/Apr/2015:12:34:56 +0000",
103+
"requestTimeEpoch": 1428582896000,
104+
"identity": {
105+
"cognitoIdentityPoolId": null,
106+
"accountId": null,
107+
"cognitoIdentityId": null,
108+
"caller": null,
109+
"accessKey": null,
110+
"sourceIp": "127.0.0.1",
111+
"cognitoAuthenticationType": null,
112+
"cognitoAuthenticationProvider": null,
113+
"userArn": null,
114+
"userAgent": "Custom User Agent String",
115+
"user": null
116+
},
117+
"path": "/prod/path/to/resource",
118+
"resourcePath": "/{proxy+}",
119+
"httpMethod": "GET",
120+
"apiId": "1234567890",
121+
"protocol": "HTTP/1.1"
122+
}
123+
}

0 commit comments

Comments
 (0)