diff --git a/tests/resources/events/aws/apigateway-authorizer.json b/tests/resources/events/aws/apigateway-authorizer.json new file mode 100644 index 0000000000..2bbf060353 --- /dev/null +++ b/tests/resources/events/aws/apigateway-authorizer.json @@ -0,0 +1,5 @@ +{ + "type": "TOKEN", + "authorizationToken": "incoming-client-token", + "methodArn": "arn:aws:execute-api:eu-central-1:123456789012:example/prod/POST/{proxy+}" +} \ No newline at end of file diff --git a/tests/resources/events/aws/apigateway-aws-proxy.json b/tests/resources/events/aws/apigateway-aws-proxy.json new file mode 100644 index 0000000000..fb46b342eb --- /dev/null +++ b/tests/resources/events/aws/apigateway-aws-proxy.json @@ -0,0 +1,123 @@ +{ + "body": "eyJ0ZXN0IjoiYm9keSJ9", + "resource": "/{proxy+}", + "path": "/path/to/resource", + "httpMethod": "POST", + "isBase64Encoded": true, + "queryStringParameters": { + "foo": "bar" + }, + "multiValueQueryStringParameters": { + "foo": [ + "bar" + ] + }, + "pathParameters": { + "proxy": "/path/to/resource" + }, + "stageVariables": { + "baz": "qux" + }, + "headers": { + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", + "Accept-Encoding": "gzip, deflate, sdch", + "Accept-Language": "en-US,en;q=0.8", + "Cache-Control": "max-age=0", + "CloudFront-Forwarded-Proto": "https", + "CloudFront-Is-Desktop-Viewer": "true", + "CloudFront-Is-Mobile-Viewer": "false", + "CloudFront-Is-SmartTV-Viewer": "false", + "CloudFront-Is-Tablet-Viewer": "false", + "CloudFront-Viewer-Country": "US", + "Host": "1234567890.execute-api.eu-central-1.amazonaws.com", + "Upgrade-Insecure-Requests": "1", + "User-Agent": "Custom User Agent String", + "Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)", + "X-Amz-Cf-Id": "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==", + "X-Forwarded-For": "127.0.0.1, 127.0.0.2", + "X-Forwarded-Port": "443", + "X-Forwarded-Proto": "https" + }, + "multiValueHeaders": { + "Accept": [ + "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" + ], + "Accept-Encoding": [ + "gzip, deflate, sdch" + ], + "Accept-Language": [ + "en-US,en;q=0.8" + ], + "Cache-Control": [ + "max-age=0" + ], + "CloudFront-Forwarded-Proto": [ + "https" + ], + "CloudFront-Is-Desktop-Viewer": [ + "true" + ], + "CloudFront-Is-Mobile-Viewer": [ + "false" + ], + "CloudFront-Is-SmartTV-Viewer": [ + "false" + ], + "CloudFront-Is-Tablet-Viewer": [ + "false" + ], + "CloudFront-Viewer-Country": [ + "US" + ], + "Host": [ + "0123456789.execute-api.eu-central-1.amazonaws.com" + ], + "Upgrade-Insecure-Requests": [ + "1" + ], + "User-Agent": [ + "Custom User Agent String" + ], + "Via": [ + "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)" + ], + "X-Amz-Cf-Id": [ + "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==" + ], + "X-Forwarded-For": [ + "127.0.0.1, 127.0.0.2" + ], + "X-Forwarded-Port": [ + "443" + ], + "X-Forwarded-Proto": [ + "https" + ] + }, + "requestContext": { + "accountId": "123456789012", + "resourceId": "123456", + "stage": "prod", + "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", + "requestTime": "09/Apr/2015:12:34:56 +0000", + "requestTimeEpoch": 1428582896000, + "identity": { + "cognitoIdentityPoolId": null, + "accountId": null, + "cognitoIdentityId": null, + "caller": null, + "accessKey": null, + "sourceIp": "127.0.0.1", + "cognitoAuthenticationType": null, + "cognitoAuthenticationProvider": null, + "userArn": null, + "userAgent": "Custom User Agent String", + "user": null + }, + "path": "/prod/path/to/resource", + "resourcePath": "/{proxy+}", + "httpMethod": "POST", + "apiId": "1234567890", + "protocol": "HTTP/1.1" + } +} \ No newline at end of file diff --git a/tests/resources/events/aws/appsync-resolver.json b/tests/resources/events/aws/appsync-resolver.json new file mode 100644 index 0000000000..94960dd1ed --- /dev/null +++ b/tests/resources/events/aws/appsync-resolver.json @@ -0,0 +1,74 @@ +{ + "arguments": { + "id": "my identifier" + }, + "identity": { + "claims": { + "sub": "192879fc-a240-4bf1-ab5a-d6a00f3063f9", + "email_verified": true, + "iss": "https://cognito-idp.us-west-2.amazonaws.com/us-west-xxxxxxxxxxx", + "phone_number_verified": false, + "cognito:username": "jdoe", + "aud": "7471s60os7h0uu77i1tk27sp9n", + "event_id": "bc334ed8-a938-4474-b644-9547e304e606", + "token_use": "id", + "auth_time": 1599154213, + "phone_number": "+19999999999", + "exp": 1599157813, + "iat": 1599154213, + "email": "jdoe@email.com" + }, + "defaultAuthStrategy": "ALLOW", + "groups": null, + "issuer": "https://cognito-idp.us-west-2.amazonaws.com/us-west-xxxxxxxxxxx", + "sourceIp": [ + "1.1.1.1" + ], + "sub": "192879fc-a240-4bf1-ab5a-d6a00f3063f9", + "username": "jdoe" + }, + "source": null, + "request": { + "headers": { + "x-forwarded-for": "1.1.1.1, 2.2.2.2", + "cloudfront-viewer-country": "US", + "cloudfront-is-tablet-viewer": "false", + "via": "2.0 xxxxxxxxxxxxxxxx.cloudfront.net (CloudFront)", + "cloudfront-forwarded-proto": "https", + "origin": "https://us-west-1.console.aws.amazon.com", + "content-length": "217", + "accept-language": "en-US,en;q=0.9", + "host": "xxxxxxxxxxxxxxxx.appsync-api.us-west-1.amazonaws.com", + "x-forwarded-proto": "https", + "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36", + "accept": "*/*", + "cloudfront-is-mobile-viewer": "false", + "cloudfront-is-smarttv-viewer": "false", + "accept-encoding": "gzip, deflate, br", + "referer": "https://us-west-1.console.aws.amazon.com/appsync/home?region=us-west-1", + "content-type": "application/json", + "sec-fetch-mode": "cors", + "x-amz-cf-id": "3aykhqlUwQeANU-HGY7E_guV5EkNeMMtwyOgiA==", + "x-amzn-trace-id": "Root=1-5f512f51-fac632066c5e848ae714", + "authorization": "eyJraWQiOiJScWFCSlJqYVJlM0hrSnBTUFpIcVRXazNOW...", + "sec-fetch-dest": "empty", + "x-amz-user-agent": "AWS-Console-AppSync/", + "cloudfront-is-desktop-viewer": "true", + "sec-fetch-site": "cross-site", + "x-forwarded-port": "443" + } + }, + "prev": null, + "info": { + "selectionSetList": [ + "id", + "field1", + "field2" + ], + "selectionSetGraphQL": "{\n id\n field1\n field2\n}", + "parentTypeName": "Mutation", + "fieldName": "createSomething", + "variables": {} + }, + "stash": {} +} \ No newline at end of file diff --git a/tests/resources/events/aws/batch-get-job.json b/tests/resources/events/aws/batch-get-job.json new file mode 100644 index 0000000000..cf95238fc4 --- /dev/null +++ b/tests/resources/events/aws/batch-get-job.json @@ -0,0 +1,5 @@ +{ + "jobName": "hello_world", + "jobQueue": "default", + "jobDefinition": "hello_world" +} \ No newline at end of file diff --git a/tests/resources/events/aws/batch-submit-job.json b/tests/resources/events/aws/batch-submit-job.json new file mode 100644 index 0000000000..cf95238fc4 --- /dev/null +++ b/tests/resources/events/aws/batch-submit-job.json @@ -0,0 +1,5 @@ +{ + "jobName": "hello_world", + "jobQueue": "default", + "jobDefinition": "hello_world" +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudformation-create-request.json b/tests/resources/events/aws/cloudformation-create-request.json new file mode 100644 index 0000000000..461752bb16 --- /dev/null +++ b/tests/resources/events/aws/cloudformation-create-request.json @@ -0,0 +1,16 @@ +{ + "RequestType": "Create", + "ResponseURL": "http://pre-signed-S3-url-for-response", + "StackId": "arn:aws:cloudformation:eu-central-1:123456789012:stack/MyStack/guid", + "RequestId": "unique id for this create request", + "ResourceType": "Custom::TestResource", + "LogicalResourceId": "MyTestResource", + "ResourceProperties": { + "StackName": "MyStack", + "List": [ + "1", + "2", + "3" + ] + } +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-ab-test.json b/tests/resources/events/aws/cloudfront-ab-test.json new file mode 100644 index 0000000000..bdc6b76e2d --- /dev/null +++ b/tests/resources/events/aws/cloudfront-ab-test.json @@ -0,0 +1,36 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "user-agent": [ + { + "key": "User-Agent", + "value": "Test Agent" + } + ], + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ], + "cookie": [ + { + "key": "Cookie", + "value": "SomeCookie=1; AnotherOne=A; X-Experiment-Name=B" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-access-request-in-response.json b/tests/resources/events/aws/cloudfront-access-request-in-response.json new file mode 100644 index 0000000000..ecb1240549 --- /dev/null +++ b/tests/resources/events/aws/cloudfront-access-request-in-response.json @@ -0,0 +1,42 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ], + "user-name": [ + { + "key": "User-Name", + "value": "CloudFront" + } + ] + }, + "clientIp": "2001:cdba::3257:9652", + "uri": "/test", + "method": "GET" + }, + "response": { + "status": "200", + "statusDescription": "OK", + "headers": { + "x-cache": [ + { + "key": "X-Cache", + "value": "Hello from Cloudfront" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-http-direct.json b/tests/resources/events/aws/cloudfront-http-direct.json new file mode 100644 index 0000000000..1f13e53dd1 --- /dev/null +++ b/tests/resources/events/aws/cloudfront-http-direct.json @@ -0,0 +1,30 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "user-agent": [ + { + "key": "User-Agent", + "value": "test-agent" + } + ], + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-modify-querystring.json b/tests/resources/events/aws/cloudfront-modify-querystring.json new file mode 100644 index 0000000000..7485310e94 --- /dev/null +++ b/tests/resources/events/aws/cloudfront-modify-querystring.json @@ -0,0 +1,37 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "querystring": "auth=test&foo=bar", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ], + "user-agent": [ + { + "key": "User-Agent", + "value": "Test Agent" + } + ], + "user-name": [ + { + "key": "User-Name", + "value": "aws-cloudfront" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-modify-response-header.json b/tests/resources/events/aws/cloudfront-modify-response-header.json new file mode 100644 index 0000000000..8ac2b4bc0f --- /dev/null +++ b/tests/resources/events/aws/cloudfront-modify-response-header.json @@ -0,0 +1,35 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "response": { + "status": "200", + "statusDescription": "OK", + "headers": { + "vary": [ + { + "key": "Vary", + "value": "*" + } + ], + "last-modified": [ + { + "key": "Last-Modified", + "value": "2016-11-25" + } + ], + "x-amz-meta-last-modified": [ + { + "key": "X-Amz-Meta-Last-Modified", + "value": "2016-01-01" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-multiple-remote-calls-aggregate-response.json b/tests/resources/events/aws/cloudfront-multiple-remote-calls-aggregate-response.json new file mode 100644 index 0000000000..1360629d73 --- /dev/null +++ b/tests/resources/events/aws/cloudfront-multiple-remote-calls-aggregate-response.json @@ -0,0 +1,30 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/forecast/Seattle:NewYork:Chicago:SanFrancisco", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ], + "user-agent": [ + { + "key": "User-Agent", + "value": "Test Agent" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-normalize-querystring-to-improve-cache-hit.json b/tests/resources/events/aws/cloudfront-normalize-querystring-to-improve-cache-hit.json new file mode 100644 index 0000000000..21100c997a --- /dev/null +++ b/tests/resources/events/aws/cloudfront-normalize-querystring-to-improve-cache-hit.json @@ -0,0 +1,37 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "querystring": "size=LARGE&color=RED", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ], + "user-agent": [ + { + "key": "User-Agent", + "value": "Test Agent" + } + ], + "user-name": [ + { + "key": "User-Name", + "value": "aws-cloudfront" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-redirect-on-viewer-country.json b/tests/resources/events/aws/cloudfront-redirect-on-viewer-country.json new file mode 100644 index 0000000000..2d24b0cb43 --- /dev/null +++ b/tests/resources/events/aws/cloudfront-redirect-on-viewer-country.json @@ -0,0 +1,30 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ], + "cloudfront-viewer-country": [ + { + "key": "CloudFront-Viewer-Country", + "value": "TW" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-redirect-unauthenticated-users.json b/tests/resources/events/aws/cloudfront-redirect-unauthenticated-users.json new file mode 100644 index 0000000000..4d064cfd0c --- /dev/null +++ b/tests/resources/events/aws/cloudfront-redirect-unauthenticated-users.json @@ -0,0 +1,24 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "method": "GET", + "querystring": "foo=bar", + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-response-generation.json b/tests/resources/events/aws/cloudfront-response-generation.json new file mode 100644 index 0000000000..2bfde0f0d6 --- /dev/null +++ b/tests/resources/events/aws/cloudfront-response-generation.json @@ -0,0 +1,24 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-serve-object-on-viewer-device.json b/tests/resources/events/aws/cloudfront-serve-object-on-viewer-device.json new file mode 100644 index 0000000000..f1f50a8980 --- /dev/null +++ b/tests/resources/events/aws/cloudfront-serve-object-on-viewer-device.json @@ -0,0 +1,48 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ], + "cloudfront-is-desktop-viewer": [ + { + "key": "CloudFront-Is-Desktop-Viewer", + "value": "true" + } + ], + "cloudfront-is-mobile-viewer": [ + { + "key": "CloudFront-Is-Mobile-Viewer", + "value": "false" + } + ], + "cloudfront-is-smarttv-viewer": [ + { + "key": "CloudFront-Is-SmartTV-Viewer", + "value": "false" + } + ], + "cloudfront-is-tablet-viewer": [ + { + "key": "CloudFront-Is-Tablet-Viewer", + "value": "false" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudfront-simple-remote-call.json b/tests/resources/events/aws/cloudfront-simple-remote-call.json new file mode 100644 index 0000000000..bf4625d06d --- /dev/null +++ b/tests/resources/events/aws/cloudfront-simple-remote-call.json @@ -0,0 +1,36 @@ +{ + "Records": [ + { + "cf": { + "config": { + "distributionId": "EXAMPLE" + }, + "request": { + "uri": "/test", + "method": "GET", + "clientIp": "2001:cdba::3257:9652", + "headers": { + "host": [ + { + "key": "Host", + "value": "d123.cf.net" + } + ], + "user-agent": [ + { + "key": "User-Agent", + "value": "Test Agent" + } + ], + "user-name": [ + { + "key": "User-Name", + "value": "aws-cloudfront" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudwatch-logs.json b/tests/resources/events/aws/cloudwatch-logs.json new file mode 100644 index 0000000000..2b455b9bc4 --- /dev/null +++ b/tests/resources/events/aws/cloudwatch-logs.json @@ -0,0 +1,5 @@ +{ + "awslogs": { + "data": "H4sIAAAAAAAAAHWPwQqCQBCGX0Xm7EFtK+smZBEUgXoLCdMhFtKV3akI8d0bLYmibvPPN3wz00CJxmQnTO41whwWQRIctmEcB6sQbFC3CjW3XW8kxpOpP+OC22d1Wml1qZkQGtoMsScxaczKN3plG8zlaHIta5KqWsozoTYw3/djzwhpLwivWFGHGpAFe7DL68JlBUk+l7KSN7tCOEJ4M3/qOI49vMHj+zCKdlFqLaU2ZHV2a4Ct/an0/ivdX8oYc1UVX860fQDQiMdxRQEAAA==" + } +} \ No newline at end of file diff --git a/tests/resources/events/aws/cloudwatch-scheduled-event.json b/tests/resources/events/aws/cloudwatch-scheduled-event.json new file mode 100644 index 0000000000..dfa0a04b5a --- /dev/null +++ b/tests/resources/events/aws/cloudwatch-scheduled-event.json @@ -0,0 +1,12 @@ +{ + "id": "cdc73f9d-aea9-11e3-9d5a-835b769c0d9c", + "detail-type": "Scheduled Event", + "source": "aws.events", + "account": "123456789012", + "time": "1970-01-01T00:00:00Z", + "region": "eu-central-1", + "resources": [ + "arn:aws:events:eu-central-1:123456789012:rule/ExampleRule" + ], + "detail": {} +} \ No newline at end of file diff --git a/tests/resources/events/aws/codecommit-repository.json b/tests/resources/events/aws/codecommit-repository.json new file mode 100644 index 0000000000..227cac73bf --- /dev/null +++ b/tests/resources/events/aws/codecommit-repository.json @@ -0,0 +1,27 @@ +{ + "Records": [ + { + "awsRegion": "eu-central-1", + "codecommit": { + "references": [ + { + "commit": "5c4ef1049f1d27deadbeeff313e0730018be182b", + "ref": "refs/heads/master" + } + ] + }, + "customData": "this is custom data", + "eventId": "5a824061-17ca-46a9-bbf9-114edeadbeef", + "eventName": "TriggerEventTest", + "eventPartNumber": 1, + "eventSource": "aws:codecommit", + "eventSourceARN": "arn:aws:codecommit:eu-central-1:123456789012:my-repo", + "eventTime": "2016-01-01T23:59:59.000+0000", + "eventTotalParts": 1, + "eventTriggerConfigId": "5a824061-17ca-46a9-bbf9-114edeadbeef", + "eventTriggerName": "my-trigger", + "eventVersion": "1.0", + "userIdentityARN": "arn:aws:iam::123456789012:root" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/codepipeline-job.json b/tests/resources/events/aws/codepipeline-job.json new file mode 100644 index 0000000000..1ebc6ccb9e --- /dev/null +++ b/tests/resources/events/aws/codepipeline-job.json @@ -0,0 +1,45 @@ +{ + "CodePipeline.job": { + "data": { + "artifactCredentials": { + "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "sessionToken": "token", + "accessKeyId": "AKIAIOSFODNN7EXAMPLE" + }, + "actionConfiguration": { + "configuration": { + "FunctionName": "my-function", + "UserParameters": "user-parameter-string" + } + }, + "inputArtifacts": [ + { + "revision": "ca2bdeadbeef7d1932acb4977e08c803295d9896", + "name": "input-artifact", + "location": { + "type": "S3", + "s3Location": { + "objectKey": "test/key", + "bucketName": "example-bucket" + } + } + } + ], + "outputArtifacts": [ + { + "revision": null, + "name": "output-artifact", + "location": { + "type": "S3", + "s3Location": { + "objectKey": "test/key2", + "bucketName": "example-bucket2" + } + } + } + ] + }, + "id": "c968ef10-6415-4127-80b1-42502218a8c7", + "accountId": "123456789012" + } +} \ No newline at end of file diff --git a/tests/resources/events/aws/cognito-sync-trigger.json b/tests/resources/events/aws/cognito-sync-trigger.json new file mode 100644 index 0000000000..e9c7a0ddd0 --- /dev/null +++ b/tests/resources/events/aws/cognito-sync-trigger.json @@ -0,0 +1,20 @@ +{ + "version": 2, + "eventType": "SyncTrigger", + "region": "eu-central-1", + "identityPoolId": "identityPoolId", + "identityId": "identityId", + "datasetName": "datasetName", + "datasetRecords": { + "SampleKey1": { + "oldValue": "oldValue1", + "newValue": "newValue1", + "op": "replace" + }, + "SampleKey2": { + "oldValue": "oldValue2", + "newValue": "newValue2", + "op": "replace" + } + } +} \ No newline at end of file diff --git a/tests/resources/events/aws/config-oversized-item-change-notification.json b/tests/resources/events/aws/config-oversized-item-change-notification.json new file mode 100644 index 0000000000..fb20d98bb7 --- /dev/null +++ b/tests/resources/events/aws/config-oversized-item-change-notification.json @@ -0,0 +1,12 @@ +{ + "invokingEvent": "{\"configurationItemSummary\": {\"changeType\": \"UPDATE\",\"configurationItemVersion\": \"1.2\",\"configurationItemCaptureTime\":\"2016-10-06T16:46:16.261Z\",\"configurationStateId\": 0,\"awsAccountId\":\"123456789012\",\"configurationItemStatus\": \"OK\",\"resourceType\": \"AWS::EC2::Instance\",\"resourceId\":\"i-00000000\",\"resourceName\":null,\"ARN\":\"arn:aws:ec2:eu-central-1:123456789012:instance/i-00000000\",\"awsRegion\": \"eu-central-1\",\"availabilityZone\":\"eu-central-1\",\"configurationStateMd5Hash\":\"8f1ee69b287895a0f8bc5753eca68e96\",\"resourceCreationTime\":\"2016-10-06T16:46:10.489Z\"},\"messageType\":\"OversizedConfigurationItemChangeNotification\"}", + "ruleParameters": "{\"\":\"\"}", + "resultToken": "myResultToken", + "eventLeftScope": false, + "executionRoleArn": "arn:aws:iam::123456789012:role/config-role", + "configRuleArn": "arn:aws:config:eu-central-1:123456789012:config-rule/config-rule-0123456", + "configRuleName": "change-triggered-config-rule", + "configRuleId": "config-rule-0123456", + "accountId": "123456789012", + "version": "1.0" +} \ No newline at end of file diff --git a/tests/resources/events/aws/config-periodic-rule.json b/tests/resources/events/aws/config-periodic-rule.json new file mode 100644 index 0000000000..03322a8b12 --- /dev/null +++ b/tests/resources/events/aws/config-periodic-rule.json @@ -0,0 +1,12 @@ +{ + "invokingEvent": "{\"awsAccountId\":\"123456789012\",\"notificationCreationTime\":\"1970-01-01T00:00:00.0Z\",\"messageType\":\"ScheduledNotification\",\"recordVersion\":\"1.0\"}", + "ruleParameters": "{\"myParameterKey\":\"myParameterValue\"}", + "resultToken": "myResultToken", + "eventLeftScope": false, + "executionRoleArn": "arn:aws:iam::123456789012:role/config-role", + "configRuleArn": "arn:aws:config:eu-central-1:123456789012:config-rule/config-rule-0123456", + "configRuleName": "periodic-config-rule", + "configRuleId": "config-rule-0123456", + "accountId": "123456789012", + "version": "1.0" +} \ No newline at end of file diff --git a/tests/resources/events/aws/confit-item-change-notification.json b/tests/resources/events/aws/confit-item-change-notification.json new file mode 100644 index 0000000000..cf79568736 --- /dev/null +++ b/tests/resources/events/aws/confit-item-change-notification.json @@ -0,0 +1,12 @@ +{ + "invokingEvent": "{\"configurationItem\":{\"configurationItemCaptureTime\":\"2016-10-06T16:46:16.261Z\",\"awsAccountId\":\"123456789012\",\"configurationItemStatus\":\"OK\",\"resourceId\":\"i-00000000\",\"resourceName\":\"foo\",\"configurationStateMd5Hash\":\"8f1ee69b297895a0f8bc5753eca68e96\",\"resourceCreationTime\":\"2016-10-06T16:46:10.489Z\",\"configurationStateId\":0,\"configurationItemVersion\":\"1.2\",\"ARN\":\"arn:aws:ec2:eu-central-1:123456789012:instance/i-00000000\",\"awsRegion\":\"eu-central-1\",\"availabilityZone\":\"eu-central-1\",\"resourceType\":\"AWS::EC2::Instance\",\"tags\":{\"\":\"\"},\"relationships\":[{\"resourceId\":\"eipalloc-00000000\",\"resourceType\":\"AWS::EC2::EIP\",\"name\":\"Is attached to ElasticIp\"}],\"configuration\":{\"\":\"\"}},\"messageType\":\"ConfigurationItemChangeNotification\"}", + "ruleParameters": "{\"\":\"\"}", + "resultToken": "myResultToken", + "eventLeftScope": false, + "executionRoleArn": "arn:aws:iam::123456789012:role/config-role", + "configRuleArn": "arn:aws:config:eu-central-1:123456789012:config-rule/config-rule-0123456", + "configRuleName": "change-triggered-config-rule", + "configRuleId": "config-rule-0123456", + "accountId": "123456789012", + "version": "1.0" +} \ No newline at end of file diff --git a/tests/resources/events/aws/connect-contact-flow-event.json b/tests/resources/events/aws/connect-contact-flow-event.json new file mode 100644 index 0000000000..b192be3150 --- /dev/null +++ b/tests/resources/events/aws/connect-contact-flow-event.json @@ -0,0 +1,33 @@ +{ + "Name": "ContactFlowEvent", + "Details": { + "ContactData": { + "Attributes": {}, + "Channel": "VOICE", + "ContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "CustomerEndpoint": { + "Address": "+11234567890", + "Type": "TELEPHONE_NUMBER" + }, + "InitialContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "InitiationMethod": "API", + "InstanceARN": "arn:aws:connect:eu-central-1:123456789012:instance/9308c2a1-9bc6-4cea-8290-6c0b4a6d38fa", + "MediaStreams": { + "Customer": { + "Audio": { + "StartFragmentNumber": "91343852333181432392682062622220590765191907586", + "StartTimestamp": "1565781909613", + "StreamARN": "arn:aws:kinesisvideo:eu-central-1:123456789012:stream/connect-contact-a3d73b84-ce0e-479a-a9dc-5637c9d30ac9/1565272947806" + } + } + }, + "PreviousContactId": "5ca32fbd-8f92-46af-92a5-6b0f970f0efe", + "Queue": null, + "SystemEndpoint": { + "Address": "+11234567890", + "Type": "TELEPHONE_NUMBER" + } + }, + "Parameters": {} + } +} \ No newline at end of file diff --git a/tests/resources/events/aws/dynamodb-update-2.json b/tests/resources/events/aws/dynamodb-update-2.json new file mode 100644 index 0000000000..c7f8ca2795 --- /dev/null +++ b/tests/resources/events/aws/dynamodb-update-2.json @@ -0,0 +1,90 @@ +{ + "Records": [ + { + "eventID": "1", + "eventVersion": "1.0", + "dynamodb": { + "Keys": { + "Id": { + "N": "101" + } + }, + "NewImage": { + "Message": { + "S": "New item!" + }, + "Id": { + "N": "101" + } + }, + "StreamViewType": "NEW_AND_OLD_IMAGES", + "SequenceNumber": "111", + "SizeBytes": 26 + }, + "awsRegion": "eu-central-1", + "eventName": "INSERT", + "eventSourceARN": "arn:aws:dynamodb:eu-central-1:account-id:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", + "eventSource": "aws:dynamodb" + }, + { + "eventID": "2", + "eventVersion": "1.0", + "dynamodb": { + "OldImage": { + "Message": { + "S": "New item!" + }, + "Id": { + "N": "101" + } + }, + "SequenceNumber": "222", + "Keys": { + "Id": { + "N": "101" + } + }, + "SizeBytes": 59, + "NewImage": { + "Message": { + "S": "This item has changed" + }, + "Id": { + "N": "101" + } + }, + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "awsRegion": "eu-central-1", + "eventName": "MODIFY", + "eventSourceARN": "arn:aws:dynamodb:eu-central-1:account-id:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", + "eventSource": "aws:dynamodb" + }, + { + "eventID": "3", + "eventVersion": "1.0", + "dynamodb": { + "Keys": { + "Id": { + "N": "101" + } + }, + "SizeBytes": 38, + "SequenceNumber": "333", + "OldImage": { + "Message": { + "S": "This item has changed" + }, + "Id": { + "N": "101" + } + }, + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "awsRegion": "eu-central-1", + "eventName": "REMOVE", + "eventSourceARN": "arn:aws:dynamodb:eu-central-1:account-id:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", + "eventSource": "aws:dynamodb" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/dynamodb-update.json b/tests/resources/events/aws/dynamodb-update.json new file mode 100644 index 0000000000..f59d46c645 --- /dev/null +++ b/tests/resources/events/aws/dynamodb-update.json @@ -0,0 +1,93 @@ +{ + "Records": [ + { + "eventID": "c4ca4238a0b923820dcc509a6f75849b", + "eventName": "INSERT", + "eventVersion": "1.1", + "eventSource": "aws:dynamodb", + "awsRegion": "eu-central-1", + "dynamodb": { + "Keys": { + "Id": { + "N": "101" + } + }, + "NewImage": { + "Message": { + "S": "New item!" + }, + "Id": { + "N": "101" + } + }, + "ApproximateCreationDateTime": 1428537600, + "SequenceNumber": "4421584500000000017450439091", + "SizeBytes": 26, + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899" + }, + { + "eventID": "c81e728d9d4c2f636f067f89cc14862c", + "eventName": "MODIFY", + "eventVersion": "1.1", + "eventSource": "aws:dynamodb", + "awsRegion": "eu-central-1", + "dynamodb": { + "Keys": { + "Id": { + "N": "101" + } + }, + "NewImage": { + "Message": { + "S": "This item has changed" + }, + "Id": { + "N": "101" + } + }, + "OldImage": { + "Message": { + "S": "New item!" + }, + "Id": { + "N": "101" + } + }, + "ApproximateCreationDateTime": 1428537600, + "SequenceNumber": "4421584500000000017450439092", + "SizeBytes": 59, + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899" + }, + { + "eventID": "eccbc87e4b5ce2fe28308fd9f2a7baf3", + "eventName": "REMOVE", + "eventVersion": "1.1", + "eventSource": "aws:dynamodb", + "awsRegion": "eu-central-1", + "dynamodb": { + "Keys": { + "Id": { + "N": "101" + } + }, + "OldImage": { + "Message": { + "S": "This item has changed" + }, + "Id": { + "N": "101" + } + }, + "ApproximateCreationDateTime": 1428537600, + "SequenceNumber": "4421584500000000017450439093", + "SizeBytes": 38, + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-analytics-compressed.json b/tests/resources/events/aws/kinesis-analytics-compressed.json new file mode 100644 index 0000000000..b6c3a539d5 --- /dev/null +++ b/tests/resources/events/aws/kinesis-analytics-compressed.json @@ -0,0 +1,11 @@ +{ + "invocationId": "invocationIdExample", + "applicationArn": "arn:aws:kinesisanalytics:eu-central-1:123456789012:application/example-application", + "streamArn": "arn:aws:kinesis:eu-central-1:123456789012:stream/example-stream", + "records": [ + { + "recordId": "49571347871967966406409637155186850213682522142927749122", + "data": "H4sIAAAAAAAA/6vmUspLzE1VslLKTsxNzFHS4VJKTEkpSi0uBgol5SRmKHHVAgDd1tysJAAAAA==" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-analytics-dynamodb.json b/tests/resources/events/aws/kinesis-analytics-dynamodb.json new file mode 100644 index 0000000000..8d45307cac --- /dev/null +++ b/tests/resources/events/aws/kinesis-analytics-dynamodb.json @@ -0,0 +1,11 @@ +{ + "invocationId": "invocationIdExample", + "applicationArn": "arn:aws:kinesisanalytics:eu-central-1:123456789012:application/example-application", + "streamArn": "arn:aws:kinesis:eu-central-1:123456789012:stream/example-stream", + "records": [ + { + "recordId": "49571347871967966406409637155186850213682522142927749122", + "data": "eyJST1dUSU1FX1RJTUVTVEFNUCI6IjIwMTctMTItMTUgMDE6MDk6NTAuMDAwIiwiVkVISUNMRUlEIjoiNSIsIlZFSElDTEVDT1VOVCI6MTh9" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-analytics-kpl.json b/tests/resources/events/aws/kinesis-analytics-kpl.json new file mode 100644 index 0000000000..807467ead1 --- /dev/null +++ b/tests/resources/events/aws/kinesis-analytics-kpl.json @@ -0,0 +1,27 @@ +{ + "invocationId": "invocationIdExample", + "applicationArn": "arn:aws:kinesisanalytics:eu-central-1:123456789012:application/example-application", + "streamArn": "arn:aws:kinesis:eu-central-1:123456789012:stream/example-stream", + "records": [ + { + "recordId": "49571347871967966406409637155186850213682522142927749122", + "kinesisStreamRecordMetadata": { + "shardId": "shardId-000000000001", + "partitionKey": "partitionKey-01", + "approximateArrivalTimestamp": 1505169657117, + "sequenceNumber": "49571347871967966406409637155186850213682522142927749122" + }, + "data": "84mawgoNMTUwNTE2OTY0NTI1MBIlODYwOTcwOTY1NTE0NjQwMzU1MjIwNTI5MjgyNDk2MzU3MTUzNxImNzk1MTM3MTQxMzM4MTE5NTU1OTExMzA1ODMxNDEyOTg2NTM2OTgaiAEIABAAGoEBNDAsYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWEKGogBCAAQARqBATQxLGFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhCkU/elbPye5g1wGkAmxGCNg=" + }, + { + "recordId": "49571347871967966406409637141563465152445265354688561154", + "kinesisStreamRecordMetadata": { + "shardId": "shardId-000000000002", + "partitionKey": "partitionKey-02", + "approximateArrivalTimestamp": 1505169647777, + "sequenceNumber": "49571347871967966406409637141563465152445265354688561154" + }, + "data": "NCxhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWEK" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-analytics.json b/tests/resources/events/aws/kinesis-analytics.json new file mode 100644 index 0000000000..7f1db565b1 --- /dev/null +++ b/tests/resources/events/aws/kinesis-analytics.json @@ -0,0 +1,11 @@ +{ + "invocationId": "invocationIdExample", + "applicationArn": "arn:aws:kinesisanalytics:eu-central-1:123456789012:application/example-application", + "streamArn": "arn:aws:kinesis:eu-central-1:123456789012:stream/example-stream", + "records": [ + { + "recordId": "49571347871967966406409637155186850213682522142927749122", + "data": "VGhpcyBpcyBhIHRlc3QgZnJvbSBLaW5lc2lzIEFuYWx5dGljcw==" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-apachelog.json b/tests/resources/events/aws/kinesis-apachelog.json new file mode 100644 index 0000000000..3f917a1613 --- /dev/null +++ b/tests/resources/events/aws/kinesis-apachelog.json @@ -0,0 +1,11 @@ +{ + "invocationId": "invocationIdExample", + "region": "eu-central-1", + "records": [ + { + "recordId": "49546986683135544286507457936321625675700192471156785154", + "approximateArrivalTimestamp": 1495072949453, + "data": "NjQuMjQyLjg4LjEwIC0gLSBbMDcvTWFyLzIwMDQ6MTY6MTA6MDIgLTA4MDBdICJHRVQgL21haWxtYW4vbGlzdGluZm8vaHNkaXZpc2lvbiBIVFRQLzEuMSIgMjAwIDYyOTE==" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-cloudwatch-logs-processor.json b/tests/resources/events/aws/kinesis-cloudwatch-logs-processor.json new file mode 100644 index 0000000000..c7978af868 --- /dev/null +++ b/tests/resources/events/aws/kinesis-cloudwatch-logs-processor.json @@ -0,0 +1,27 @@ +{ + "records": [ + { + "recordId": "49578734086442259037497492980620233840400173390482112514000000", + "data": "H4sIAAAAAAAAADWO0QqCMBiFX2XsWiJFi7wLUW8sIYUuQmLpnxvpJttMQnz3Ztrlxzmc8424BaVIDfmnA+zjID3nlzS5n8IsO8YhtrAYOMg5aURfDUSXNBG1MkEj6liKvjPZQpmWQNoFVf9QpWSdZoJHrNEgFfZvxa8XvoHrGUfMqqWumdHQpDVjtmdvHc91dwdn71p/vVngmqBVD616PgoolC/Ga0SBNJoi8USVWWKczM8oYhKoULDBUzF9Aeua5yHsAAAA", + "approximateArrivalTimestamp": 1510254469499 + }, + { + "recordId": "49578734086442259037497492980621442766219788363254202370000000", + "data": "H4sIAAAAAAAAAJWRTWsbMRCG/8ueLZjRjL5yc9NNLnZDapemlFAkrTYstb3Lep0Qgv97x00KgTSHnAQzmkeP3nmqtmW/j3dl/TiU6qz6PF/Pfy3r1Wp+WVezqn/YlVHK2pK3Hr0Jxkt5099djv1hkE7uh0eVHzZqE7epiarb3fe/ixzDYVJoELRhssYQqsXLlEJ3jd8//biy4QYWz7jVNJa4/TDveQwV+qsada0v/HnthLg/pH0eu2Hq+t1Ft5nKuK/Ofn4EvnpDUAu7Xi6/LL9en3/z1e1f7fq+7KYT+qnqGrEnsi54AGS2wbHWxjCjoWAYGawmzawByIG3Dp0JzjOxsaI8dbKJKW4l1BcTdgg+zP5tSPCeQ/Bso/I+o+I2kUptjgrRlQyasslUHWdvZRwGJ4+HYJGCtiKgQTYKSJ4gODLgAkpFk3f0rkyA1zLGSsvoVsVCRTFakUkNqKxt1IyFc8T/y0gEmoHZo5a/W9HhU0TeWHMyIJaoQC6zDvC+DL6WSW3MqZSkiolJcWoalWybJSNIJTXcRgjV8fb4BwwLrNzwAgAA", + "approximateArrivalTimestamp": 1510254473773 + }, + { + "recordId": "49578734086442259037497492980622651692039402992428908546000000", + "data": "H4sIAAAAAAAAAJWRbWsbMQyA/8t9jkGSJdnut2zLCiXZyJKyZaMM352vHEty4e7SUkr++9yXwUbXD8Vgg2w9eizdF7s0DPE6re8OqTgrPkzX05+L2Wo1PZ8Vk6K73ac+h0mtV49egvgc3nbX5313POSbqjvcmep2a7ZxV9bRtPub7lfKx+E4GhQEErYqYtHMn7MMuiV+fbf5rOEbzJ9wq7FPcfdm3lOaNReXyws/3cw2fvk9A4djOVR9exjbbv+x3Y6pH4qzH29hr14QzFzXi8WnxZfl+0tfXD1az27SfnxA3xdtneWtVRc8ADJrcEwkwoxigzAyiBNxzkJuIxGrei+g3gbgrDy2eRBj3OWePpuwQ/Bh8mdAGR+J69pJMFXKihwTGJ+aYJArpkjYQB2K0+SljMPgyFIIijaQgs2BAMEyexbns1NeoqpsCV+VCfCPTOVLLgUMU4h5S5UpE4BRm6ROqCEF/r8MExBDro3ED0XBMigFVM0iQlkRvZLml9a/LoN/yzSYKoIKTOmVTf6VNTHZxkjTIElkqlCL09XpN5PgkxrvAgAA", + "approximateArrivalTimestamp": 1510254474027 + }, + { + "recordId": "49578734086442259037497492980623860617859017621603614722000000", + "data": "H4sIAAAAAAAAAJWRW28aQQyF/8s+M9J47LHHeaMtzUOhEQXSVlVUDctstCqwCJZEUcR/r3OpFCnNQ17mcjw+8+n4vtqUwyFfl/ndrlRn1afhfPh7MprNhuejalB1t9uyNzkwJk6QosZk8rq7Pt93x51V6m535+rbtVvnzXKVXbu96f4U23bH3kEEHyIhx4jgxs9dDmQK3z/8vGD94cdPdrN+X/Lm3X5PbcHp5QLkYrqYLC6/mOHhuDzU+3bXt932c7vuy/5Qnf16j/fslYMb83wy+Tr5Nv24SNXVI/Xopmz7B+v7ql0ZPCKLJu+BiFUohBiJIKJGAvIkSTgpsU8aVBNangymsCH3rQ2izxvL9JmEBOzh4N+AzL6gX3JD7CLn4kg8OiVduahNkIa0BtbqNHgNI6AS0P5kQA3sUcA4IDCElCBKwgdgiCoI+CaM+pcwbAVfN8F5r2owGV0OdpWkS8kp52a1/D8MBR8sDUoQKDIbDnqlhAgQLTMWz8YbRQT92zDwEkbIQ10YHUZbKGfvUmrAIWodih2btKpOV6e/zXGIX+8CAAA=", + "approximateArrivalTimestamp": 1510254474388 + } + ], + "region": "eu-central-1", + "deliveryStreamArn": "arn:aws:firehose:eu-central-1:123456789012:deliverystream/copy-cwl-lambda-invoke-input-151025436553-Firehose-8KILJ01Q5OBN", + "invocationId": "a7234216-12b6-4bc0-96d7-82606c0e80cf" +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-get-records.json b/tests/resources/events/aws/kinesis-get-records.json new file mode 100644 index 0000000000..12abdabd3c --- /dev/null +++ b/tests/resources/events/aws/kinesis-get-records.json @@ -0,0 +1,20 @@ +{ + "Records": [ + { + "kinesis": { + "partitionKey": "partitionKey-03", + "kinesisSchemaVersion": "1.0", + "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=", + "sequenceNumber": "49545115243490985018280067714973144582180062593244200961", + "approximateArrivalTimestamp": 1428537600 + }, + "eventSource": "aws:kinesis", + "eventID": "shardId-000000000000:49545115243490985018280067714973144582180062593244200961", + "invokeIdentityArn": "arn:aws:iam::EXAMPLE", + "eventVersion": "1.0", + "eventName": "aws:kinesis:record", + "eventSourceARN": "arn:aws:kinesis:EXAMPLE", + "awsRegion": "eu-central-1" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-kinesis-firehose.json b/tests/resources/events/aws/kinesis-kinesis-firehose.json new file mode 100644 index 0000000000..df23583934 --- /dev/null +++ b/tests/resources/events/aws/kinesis-kinesis-firehose.json @@ -0,0 +1,12 @@ +{ + "invocationId": "invocationIdExample", + "deliveryStreamArn": "arn:aws:kinesis:EXAMPLE", + "region": "eu-central-1", + "records": [ + { + "recordId": "49546986683135544286507457936321625675700192471156785154", + "approximateArrivalTimestamp": 1495072949453, + "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-streams-source.json b/tests/resources/events/aws/kinesis-streams-source.json new file mode 100644 index 0000000000..a462dc7e07 --- /dev/null +++ b/tests/resources/events/aws/kinesis-streams-source.json @@ -0,0 +1,19 @@ +{ + "invocationId": "invocationIdExample", + "deliverySteamArn": "arn:aws:kinesis:EXAMPLE", + "region": "eu-central-1", + "records": [ + { + "recordId": "49546986683135544286507457936321625675700192471156785154", + "approximateArrivalTimestamp": 1495072949453, + "kinesisRecordMetadata": { + "sequenceNumber": "49545115243490985018280067714973144582180062593244200961", + "subsequenceNumber": "123456", + "partitionKey": "partitionKey-03", + "shardId": "shardId-000000000000", + "approximateArrivalTimestamp": 1495072949453 + }, + "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/kinesis-syslog.json b/tests/resources/events/aws/kinesis-syslog.json new file mode 100644 index 0000000000..bac8ff5567 --- /dev/null +++ b/tests/resources/events/aws/kinesis-syslog.json @@ -0,0 +1,16 @@ +{ + "invocationId": "fir", + "region": "eu-central-1", + "records": [ + { + "recordId": "49546986683135544286507457936321625675700192471156785154", + "approximateArrivalTimestamp": 1495072949453, + "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=" + }, + { + "recordId": "49546986683135544286507457936321625675700192471156785154", + "approximateArrivalTimestamp": "2012-04-23T18:25:43.511Z", + "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0IDEyMy4=" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/rekognition-s3-request.json b/tests/resources/events/aws/rekognition-s3-request.json new file mode 100644 index 0000000000..89e0bd312c --- /dev/null +++ b/tests/resources/events/aws/rekognition-s3-request.json @@ -0,0 +1,38 @@ +{ + "Records": [ + { + "eventVersion": "2.0", + "eventSource": "aws:s3", + "awsRegion": "eu-central-1", + "eventTime": "1970-01-01T00:00:00.000Z", + "eventName": "ObjectCreated:Put", + "userIdentity": { + "principalId": "EXAMPLE" + }, + "requestParameters": { + "sourceIPAddress": "127.0.0.1" + }, + "responseElements": { + "x-amz-request-id": "EXAMPLE123456789", + "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" + }, + "s3": { + "s3SchemaVersion": "1.0", + "configurationId": "testConfigRule", + "bucket": { + "name": "example-bucket", + "ownerIdentity": { + "principalId": "EXAMPLE" + }, + "arn": "arn:aws:s3:::example-bucket" + }, + "object": { + "key": "test/key", + "size": 1024, + "eTag": "0123456789abcdef0123456789abcdef", + "sequencer": "0A1B2C3D4E5F678901" + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/s3-delete.json b/tests/resources/events/aws/s3-delete.json new file mode 100644 index 0000000000..fd30611694 --- /dev/null +++ b/tests/resources/events/aws/s3-delete.json @@ -0,0 +1,36 @@ +{ + "Records": [ + { + "eventVersion": "2.0", + "eventSource": "aws:s3", + "awsRegion": "eu-central-1", + "eventTime": "1970-01-01T00:00:00.000Z", + "eventName": "ObjectRemoved:Delete", + "userIdentity": { + "principalId": "EXAMPLE" + }, + "requestParameters": { + "sourceIPAddress": "127.0.0.1" + }, + "responseElements": { + "x-amz-request-id": "EXAMPLE123456789", + "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" + }, + "s3": { + "s3SchemaVersion": "1.0", + "configurationId": "testConfigRule", + "bucket": { + "name": "example-bucket", + "ownerIdentity": { + "principalId": "EXAMPLE" + }, + "arn": "arn:aws:s3:::example-bucket" + }, + "object": { + "key": "test/key", + "sequencer": "0A1B2C3D4E5F678901" + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/s3-put.json b/tests/resources/events/aws/s3-put.json new file mode 100644 index 0000000000..89e0bd312c --- /dev/null +++ b/tests/resources/events/aws/s3-put.json @@ -0,0 +1,38 @@ +{ + "Records": [ + { + "eventVersion": "2.0", + "eventSource": "aws:s3", + "awsRegion": "eu-central-1", + "eventTime": "1970-01-01T00:00:00.000Z", + "eventName": "ObjectCreated:Put", + "userIdentity": { + "principalId": "EXAMPLE" + }, + "requestParameters": { + "sourceIPAddress": "127.0.0.1" + }, + "responseElements": { + "x-amz-request-id": "EXAMPLE123456789", + "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" + }, + "s3": { + "s3SchemaVersion": "1.0", + "configurationId": "testConfigRule", + "bucket": { + "name": "example-bucket", + "ownerIdentity": { + "principalId": "EXAMPLE" + }, + "arn": "arn:aws:s3:::example-bucket" + }, + "object": { + "key": "test/key", + "size": 1024, + "eTag": "0123456789abcdef0123456789abcdef", + "sequencer": "0A1B2C3D4E5F678901" + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/sagemaker-ground-truth-annotation-consolidation.json b/tests/resources/events/aws/sagemaker-ground-truth-annotation-consolidation.json new file mode 100644 index 0000000000..2aeb4fbbce --- /dev/null +++ b/tests/resources/events/aws/sagemaker-ground-truth-annotation-consolidation.json @@ -0,0 +1,9 @@ +{ + "version": "2018-10-16", + "labelingJobArn": "arn:aws:sagemaker:eu-central-1:123456789012:labeling-job/example-job", + "labelAttributeName": "example-attribute", + "roleArn": "aws:aws:iam::{{account_id}}:role/sagemaker-role", + "payload": { + "s3Uri": "s3://sagemakerexample/output/example-job/annotations/worker_response/iteration-1/0/2019-09-06_18:35:03.json" + } +} \ No newline at end of file diff --git a/tests/resources/events/aws/sagemaker-ground-truth-pre-human.json b/tests/resources/events/aws/sagemaker-ground-truth-pre-human.json new file mode 100644 index 0000000000..26c9755d2c --- /dev/null +++ b/tests/resources/events/aws/sagemaker-ground-truth-pre-human.json @@ -0,0 +1,7 @@ +{ + "version": "2018-10-16", + "labelingJobArn": "arn:aws:sagemaker:eu-central-1:123456789012:labeling-job/example-job", + "dataObject": { + "source-ref": "s3://sagemakerexample/object_to_annotate.jpg" + } +} \ No newline at end of file diff --git a/tests/resources/events/aws/ses-email-receiving.json b/tests/resources/events/aws/ses-email-receiving.json new file mode 100644 index 0000000000..3a80dfe175 --- /dev/null +++ b/tests/resources/events/aws/ses-email-receiving.json @@ -0,0 +1,97 @@ +{ + "Records": [ + { + "eventSource": "aws:ses", + "eventVersion": "1.0", + "ses": { + "mail": { + "commonHeaders": { + "date": "Wed, 7 Oct 2015 12:34:56 -0700", + "from": [ + "Jane Doe " + ], + "messageId": "<0123456789example.com>", + "returnPath": "janedoe@example.com", + "subject": "Test Subject", + "to": [ + "johndoe@example.com" + ] + }, + "destination": [ + "johndoe@example.com" + ], + "headers": [ + { + "name": "Return-Path", + "value": "" + }, + { + "name": "Received", + "value": "from mailer.example.com (mailer.example.com [203.0.113.1]) by inbound-smtp.eu-central-1.amazonaws.com with SMTP id o3vrnil0e2ic28trm7dfhrc2v0cnbeccl4nbp0g1 for johndoe@example.com; Wed, 07 Oct 2015 12:34:56 +0000 (UTC)" + }, + { + "name": "DKIM-Signature", + "value": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=example; h=mime-version:from:date:message-id:subject:to:content-type; bh=jX3F0bCAI7sIbkHyy3mLYO28ieDQz2R0P8HwQkklFj4=; b=sQwJ+LMe9RjkesGu+vqU56asvMhrLRRYrWCbVt6WJulueecwfEwRf9JVWgkBTKiL6m2hr70xDbPWDhtLdLO+jB3hzjVnXwK3pYIOHw3vxG6NtJ6o61XSUwjEsp9tdyxQjZf2HNYee873832l3K1EeSXKzxYk9Pwqcpi3dMC74ct9GukjIevf1H46hm1L2d9VYTL0LGZGHOAyMnHmEGB8ZExWbI+k6khpurTQQ4sp4PZPRlgHtnj3Zzv7nmpTo7dtPG5z5S9J+L+Ba7dixT0jn3HuhaJ9b+VThboo4YfsX9PMNhWWxGjVksSFOcGluPO7QutCPyoY4gbxtwkN9W69HA==" + }, + { + "name": "MIME-Version", + "value": "1.0" + }, + { + "name": "From", + "value": "Jane Doe " + }, + { + "name": "Date", + "value": "Wed, 7 Oct 2015 12:34:56 -0700" + }, + { + "name": "Message-ID", + "value": "<0123456789example.com>" + }, + { + "name": "Subject", + "value": "Test Subject" + }, + { + "name": "To", + "value": "johndoe@example.com" + }, + { + "name": "Content-Type", + "value": "text/plain; charset=UTF-8" + } + ], + "headersTruncated": false, + "messageId": "o3vrnil0e2ic28trm7dfhrc2v0clambda4nbp0g1", + "source": "janedoe@example.com", + "timestamp": "1970-01-01T00:00:00.000Z" + }, + "receipt": { + "action": { + "functionArn": "arn:aws:lambda:eu-central-1:123456789012:function:Example", + "invocationType": "Event", + "type": "Lambda" + }, + "dkimVerdict": { + "status": "PASS" + }, + "processingTimeMillis": 574, + "recipients": [ + "johndoe@example.com" + ], + "spamVerdict": { + "status": "PASS" + }, + "spfVerdict": { + "status": "PASS" + }, + "timestamp": "1970-01-01T00:00:00.000Z", + "virusVerdict": { + "status": "PASS" + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/sns-notification.json b/tests/resources/events/aws/sns-notification.json new file mode 100644 index 0000000000..4bb79dee1e --- /dev/null +++ b/tests/resources/events/aws/sns-notification.json @@ -0,0 +1,31 @@ +{ + "Records": [ + { + "EventSource": "aws:sns", + "EventVersion": "1.0", + "EventSubscriptionArn": "arn:aws:sns:eu-central-1:{{{accountId}}}:ExampleTopic", + "Sns": { + "Type": "Notification", + "MessageId": "95df01b4-ee98-5cb9-9903-4c221d41eb5e", + "TopicArn": "arn:aws:sns:eu-central-1:123456789012:ExampleTopic", + "Subject": "example subject", + "Message": "example message", + "Timestamp": "1970-01-01T00:00:00.000Z", + "SignatureVersion": "1", + "Signature": "EXAMPLE", + "SigningCertUrl": "EXAMPLE", + "UnsubscribeUrl": "EXAMPLE", + "MessageAttributes": { + "Test": { + "Type": "String", + "Value": "TestString" + }, + "TestBinary": { + "Type": "Binary", + "Value": "TestBinary" + } + } + } + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/sqs-receive-message.json b/tests/resources/events/aws/sqs-receive-message.json new file mode 100644 index 0000000000..a24697a237 --- /dev/null +++ b/tests/resources/events/aws/sqs-receive-message.json @@ -0,0 +1,20 @@ +{ + "Records": [ + { + "messageId": "19dd0b57-b21e-4ac1-bd88-01bbb068cb78", + "receiptHandle": "MessageReceiptHandle", + "body": "Hello from SQS!", + "attributes": { + "ApproximateReceiveCount": "1", + "SentTimestamp": "1523232000000", + "SenderId": "123456789012", + "ApproximateFirstReceiveTimestamp": "1523232000001" + }, + "messageAttributes": {}, + "md5OfBody": "{{{md5_of_body}}}", + "eventSource": "aws:sqs", + "eventSourceARN": "arn:aws:sqs:eu-central-1:123456789012:MyQueue", + "awsRegion": "eu-central-1" + } + ] +} \ No newline at end of file diff --git a/tests/resources/events/aws/stepfunctions-error.json b/tests/resources/events/aws/stepfunctions-error.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/tests/resources/events/aws/stepfunctions-error.json @@ -0,0 +1 @@ +{} \ No newline at end of file