Skip to content

Commit 905ebd9

Browse files
committed
complete all examples
1 parent 2e28218 commit 905ebd9

18 files changed

+664
-173
lines changed

docs/utilities/data_classes.md

Lines changed: 149 additions & 173 deletions
Large diffs are not rendered by default.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"version":"2.0",
3+
"routeKey":"$default",
4+
"rawPath":"/",
5+
"rawQueryString":"",
6+
"headers":{
7+
"sec-fetch-mode":"navigate",
8+
"x-amzn-tls-version":"TLSv1.2",
9+
"sec-fetch-site":"cross-site",
10+
"accept-language":"pt-BR,pt;q=0.9",
11+
"x-forwarded-proto":"https",
12+
"x-forwarded-port":"443",
13+
"x-forwarded-for":"123.123.123.123",
14+
"sec-fetch-user":"?1",
15+
"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
16+
"x-amzn-tls-cipher-suite":"ECDHE-RSA-AES128-GCM-SHA256",
17+
"sec-ch-ua":"\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"102\", \"Google Chrome\";v=\"102\"",
18+
"sec-ch-ua-mobile":"?0",
19+
"x-amzn-trace-id":"Root=1-62ecd163-5f302e550dcde3b12402207d",
20+
"sec-ch-ua-platform":"\"Linux\"",
21+
"host":"<url-id>.lambda-url.us-east-1.on.aws",
22+
"upgrade-insecure-requests":"1",
23+
"cache-control":"max-age=0",
24+
"accept-encoding":"gzip, deflate, br",
25+
"sec-fetch-dest":"document",
26+
"user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
27+
},
28+
"requestContext":{
29+
"accountId":"anonymous",
30+
"apiId":"<url-id>",
31+
"domainName":"<url-id>.lambda-url.us-east-1.on.aws",
32+
"domainPrefix":"<url-id>",
33+
"http":{
34+
"method":"GET",
35+
"path":"/",
36+
"protocol":"HTTP/1.1",
37+
"sourceIp":"123.123.123.123",
38+
"userAgent":"agent"
39+
},
40+
"requestId":"id",
41+
"routeKey":"$default",
42+
"stage":"$default",
43+
"time":"05/Aug/2022:08:14:39 +0000",
44+
"timeEpoch":1659687279885
45+
},
46+
"isBase64Encoded":false
47+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"eventSource": "aws:rmq",
3+
"eventSourceArn": "arn:aws:mq:us-west-2:112556298976:broker:pizzaBroker:b-9bcfa592-423a-4942-879d-eb284b418fc8",
4+
"rmqMessagesByQueue": {
5+
"pizzaQueue::/": [
6+
{
7+
"basicProperties": {
8+
"contentType": "text/plain",
9+
"contentEncoding": null,
10+
"headers": {
11+
"header1": {
12+
"bytes": [
13+
118,
14+
97,
15+
108,
16+
117,
17+
101,
18+
49
19+
]
20+
},
21+
"header2": {
22+
"bytes": [
23+
118,
24+
97,
25+
108,
26+
117,
27+
101,
28+
50
29+
]
30+
},
31+
"numberInHeader": 10
32+
},
33+
"deliveryMode": 1,
34+
"priority": 34,
35+
"correlationId": null,
36+
"replyTo": null,
37+
"expiration": "60000",
38+
"messageId": null,
39+
"timestamp": "Jan 1, 1970, 12:33:41 AM",
40+
"type": null,
41+
"userId": "1234",
42+
"appId": null,
43+
"clusterId": null,
44+
"bodySize": 80
45+
},
46+
"redelivered": false,
47+
"data": "eyJ0aW1lb3V0IjowLCJkYXRhIjoiQ1pybWYwR3c4T3Y0YnFMUXhENEUifQ=="
48+
}
49+
]
50+
}
51+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"invocationSchemaVersion": "2.0",
3+
"invocationId": "YXNkbGZqYWRmaiBhc2RmdW9hZHNmZGpmaGFzbGtkaGZza2RmaAo",
4+
"job": {
5+
"id": "f3cc4f60-61f6-4a2b-8a21-d07600c373ce",
6+
"userArguments": {
7+
"k1": "v1",
8+
"k2": "v2"
9+
}
10+
},
11+
"tasks": [
12+
{
13+
"taskId": "dGFza2lkZ29lc2hlcmUK",
14+
"s3Key": "prefix/dataset/dataset.20231222.json.gz",
15+
"s3VersionId": null,
16+
"s3Bucket": "powertools-dataset"
17+
}
18+
]
19+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"Records": [
3+
{
4+
"eventVersion": "2.1",
5+
"eventSource": "aws:s3",
6+
"awsRegion": "us-east-2",
7+
"eventTime": "2019-09-03T19:37:27.192Z",
8+
"eventName": "ObjectCreated:Put",
9+
"userIdentity": {
10+
"principalId": "123"
11+
},
12+
"requestParameters": {
13+
"sourceIPAddress": "205.255.255.255"
14+
},
15+
"responseElements": {
16+
"x-amz-request-id": "D82B88E5F771F645",
17+
"x-amz-id-2": "vlR7PnpV2Ce81l0PRw6jlUpck7Jo5ZsQjryTjKlc5aLWGVHPZLj5NeC6qMa0emYBDXOo6QBU0Wo="
18+
},
19+
"s3": {
20+
"s3SchemaVersion": "1.0",
21+
"configurationId": "828aa6fc-f7b5-4305-8584-487c791949c1",
22+
"bucket": {
23+
"name": "lambda-artifacts-deafc19498e3f2df",
24+
"ownerIdentity": {
25+
"principalId": "123"
26+
},
27+
"arn": "arn:aws:s3:::lambda-artifacts-deafc19498e3f2df"
28+
},
29+
"object": {
30+
"key": "b21b84d653bb07b05b1e6b33684dc11b",
31+
"size": 1305107,
32+
"eTag": "b21b84d653bb07b05b1e6b33684dc11b",
33+
"sequencer": "0C0F6F405D6ED209E1"
34+
}
35+
}
36+
}
37+
]
38+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"version": "0",
3+
"id": "f5f1e65c-dc3a-93ca-6c1e-b1647eac7963",
4+
"detail-type": "Object Created",
5+
"source": "aws.s3",
6+
"account": "123456789012",
7+
"time": "2023-03-08T17:50:14Z",
8+
"region": "eu-west-1",
9+
"resources": [
10+
"arn:aws:s3:::example-bucket"
11+
],
12+
"detail": {
13+
"version": "0",
14+
"bucket": {
15+
"name": "example-bucket"
16+
},
17+
"object": {
18+
"key": "img.jpg",
19+
"size": 184662,
20+
"etag": "4e68adba0abe2dc8653dc3354e14c01d",
21+
"sequencer": "006408CAD69598B05E"
22+
},
23+
"request-id": "57H08PA84AB1JZW0",
24+
"requester": "123456789012",
25+
"source-ip-address": "34.252.34.74",
26+
"reason": "PutObject"
27+
}
28+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"xAmzRequestId": "1a5ed718-5f53-471d-b6fe-5cf62d88d02a",
3+
"getObjectContext": {
4+
"inputS3Url": "https://myap-123412341234.s3-accesspoint.us-east-1.amazonaws.com/s3.txt?X-Amz-Security-Token=...",
5+
"outputRoute": "io-iad-cell001",
6+
"outputToken": "..."
7+
},
8+
"configuration": {
9+
"accessPointArn": "arn:aws:s3-object-lambda:us-east-1:123412341234:accesspoint/myolap",
10+
"supportingAccessPointArn": "arn:aws:s3:us-east-1:123412341234:accesspoint/myap",
11+
"payload": "test"
12+
},
13+
"userRequest": {
14+
"url": "/s3.txt",
15+
"headers": {
16+
"Host": "myolap-123412341234.s3-object-lambda.us-east-1.amazonaws.com",
17+
"Accept-Encoding": "identity",
18+
"X-Amz-Content-SHA256": "e3b0c44297fc1c149afbf4c8995fb92427ae41e4649b934ca495991b7852b855"
19+
}
20+
},
21+
"userIdentity": {
22+
"type": "IAMUser",
23+
"principalId": "...",
24+
"arn": "arn:aws:iam::123412341234:user/myuser",
25+
"accountId": "123412341234",
26+
"accessKeyId": "..."
27+
},
28+
"protocolVersion": "1.00"
29+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"Records": [
3+
{
4+
"eventVersion": "1.0",
5+
"ses": {
6+
"mail": {
7+
"commonHeaders": {
8+
"from": [
9+
"Jane Doe <[email protected]>"
10+
],
11+
"to": [
12+
13+
],
14+
"returnPath": "[email protected]",
15+
"messageId": "<0123456789example.com>",
16+
"date": "Wed, 7 Oct 2015 12:34:56 -0700",
17+
"subject": "Test Subject"
18+
},
19+
"source": "[email protected]",
20+
"timestamp": "1970-01-01T00:00:00.000Z",
21+
"destination": [
22+
23+
],
24+
"headers": [
25+
{
26+
"name": "Return-Path",
27+
"value": "<[email protected]>"
28+
},
29+
{
30+
"name": "Received",
31+
"value": "from mailer.example.com (mailer.example.com [203.0.113.1]) by ..."
32+
},
33+
{
34+
"name": "DKIM-Signature",
35+
"value": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=example; ..."
36+
},
37+
{
38+
"name": "MIME-Version",
39+
"value": "1.0"
40+
},
41+
{
42+
"name": "From",
43+
"value": "Jane Doe <[email protected]>"
44+
},
45+
{
46+
"name": "Date",
47+
"value": "Wed, 7 Oct 2015 12:34:56 -0700"
48+
},
49+
{
50+
"name": "Message-ID",
51+
"value": "<0123456789example.com>"
52+
},
53+
{
54+
"name": "Subject",
55+
"value": "Test Subject"
56+
},
57+
{
58+
"name": "To",
59+
"value": "[email protected]"
60+
},
61+
{
62+
"name": "Content-Type",
63+
"value": "text/plain; charset=UTF-8"
64+
}
65+
],
66+
"headersTruncated": false,
67+
"messageId": "o3vrnil0e2ic28tr"
68+
},
69+
"receipt": {
70+
"recipients": [
71+
72+
],
73+
"timestamp": "1970-01-01T00:00:00.000Z",
74+
"spamVerdict": {
75+
"status": "PASS"
76+
},
77+
"dkimVerdict": {
78+
"status": "PASS"
79+
},
80+
"dmarcPolicy": "reject",
81+
"processingTimeMillis": 574,
82+
"action": {
83+
"type": "Lambda",
84+
"invocationType": "Event",
85+
"functionArn": "arn:aws:lambda:us-west-2:012345678912:function:Example"
86+
},
87+
"dmarcVerdict": {
88+
"status": "PASS"
89+
},
90+
"spfVerdict": {
91+
"status": "PASS"
92+
},
93+
"virusVerdict": {
94+
"status": "PASS"
95+
}
96+
}
97+
},
98+
"eventSource": "aws:ses"
99+
}
100+
]
101+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"Records": [
3+
{
4+
"EventVersion": "1.0",
5+
"EventSubscriptionArn": "arn:aws:sns:us-east-2:123456789012:sns-la ...",
6+
"EventSource": "aws:sns",
7+
"Sns": {
8+
"SignatureVersion": "1",
9+
"Timestamp": "2019-01-02T12:45:07.000Z",
10+
"Signature": "tcc6faL2yUC6dgZdmrwh1Y4cGa/ebXEkAi6RibDsvpi+tE/1+82j...65r==",
11+
"SigningCertUrl": "https://sns.us-east-2.amazonaws.com/SimpleNotification",
12+
"MessageId": "95df01b4-ee98-5cb9-9903-4c221d41eb5e",
13+
"Message": "Hello from SNS!",
14+
"MessageAttributes": {
15+
"Test": {
16+
"Type": "String",
17+
"Value": "TestString"
18+
},
19+
"TestBinary": {
20+
"Type": "Binary",
21+
"Value": "TestBinary"
22+
}
23+
},
24+
"Type": "Notification",
25+
"UnsubscribeUrl": "https://sns.us-east-2.amazonaws.com/?Action=Unsubscribe",
26+
"TopicArn": "arn:aws:sns:us-east-2:123456789012:sns-lambda",
27+
"Subject": "TestInvoke"
28+
}
29+
}
30+
]
31+
}

0 commit comments

Comments
 (0)