You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @codyfrisch - thank you for opening this feature request.
The schema is indeed missing and should be added.
I have added this issue to the backlog and also opened it for contributions.
For potential contributors: the goal of this task should be to add new schemas to the packages/parser/src/schemas folder that map the payloads described here and the types here.
If anyone is interested, please leave a comment under this issue so we can assign it to you, and please don't hesitate to ask for questions or clarifications as needed.
changed the title [-]Add parser for APIGatewayRequestAuthorizerEventV2[/-][+]Feature Request: add APIGatewayRequestAuthorizerEventV2 schemas/envelopes[/+]on Jun 17, 2024
I have started working on this and in order to do a comprehensive review I have decided to create some API Gateway resources with different configurations, so that I can observe the payloads and write schemas for them.
REST API (v1)
No auth
POST /no-auth for unauthenticated requests
Request:
http POST https://puhdx84jy9.execute-api.eu-west-1.amazonaws.com/prod/no-auth
Activity
dreamorosi commentedon Jun 9, 2024
Hi @codyfrisch - thank you for opening this feature request.
The schema is indeed missing and should be added.
I have added this issue to the backlog and also opened it for contributions.
For potential contributors: the goal of this task should be to add new schemas to the
packages/parser/src/schemasfolder that map the payloads described here and the types here.If anyone is interested, please leave a comment under this issue so we can assign it to you, and please don't hesitate to ask for questions or clarifications as needed.
3 remaining items
[-]Add parser for APIGatewayRequestAuthorizerEventV2[/-][+]Feature Request: add APIGatewayRequestAuthorizerEventV2 schemas/envelopes[/+]dreamorosi commentedon Jun 17, 2024
I have started working on this and in order to do a comprehensive review I have decided to create some API Gateway resources with different configurations, so that I can observe the payloads and write schemas for them.
REST API (v1)
No auth
POST /no-authfor unauthenticated requestsRequest:
Payload received by handler:
Details
{ "resource": "/no-auth", "path": "/no-auth", "httpMethod": "POST", "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "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-ASN": "7224", "CloudFront-Viewer-Country": "GB", "Host": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "User-Agent": "HTTPie/3.2.2", "Via": "1.1 49c0c4776e390b983c9f9f5365e3140c.cloudfront.net (CloudFront)", "X-Amz-Cf-Id": "x9VncJ8IMo4X5UQEL8-Xg94vWwwuokofx236RgW1CrFCTh9DnPrgJA==", "X-Amzn-Trace-Id": "Root=1-66704cad-0fbaf1491365339d168b2a7d", "X-Forwarded-For": "15.248.3.126, 130.176.209.21", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" }, "multiValueHeaders": { "Accept": [ "*/*" ], "Accept-Encoding": [ "gzip, deflate" ], "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-ASN": [ "7224" ], "CloudFront-Viewer-Country": [ "GB" ], "Host": [ "puhdx84jy9.execute-api.eu-west-1.amazonaws.com" ], "User-Agent": [ "HTTPie/3.2.2" ], "Via": [ "1.1 49c0c4776e390b983c9f9f5365e3140c.cloudfront.net (CloudFront)" ], "X-Amz-Cf-Id": [ "x9VncJ8IMo4X5UQEL8-Xg94vWwwuokofx236RgW1CrFCTh9DnPrgJA==" ], "X-Amzn-Trace-Id": [ "Root=1-66704cad-0fbaf1491365339d168b2a7d" ], "X-Forwarded-For": [ "15.248.3.126, 130.176.209.21" ], "X-Forwarded-Port": [ "443" ], "X-Forwarded-Proto": [ "https" ] }, "queryStringParameters": null, "multiValueQueryStringParameters": null, "pathParameters": null, "stageVariables": null, "requestContext": { "resourceId": "3nq1cq", "resourcePath": "/no-auth", "httpMethod": "POST", "extendedRequestId": "ZhDrKF5dDoEEHfA=", "requestTime": "17/Jun/2024:14:48:13 +0000", "path": "/prod/no-auth", "accountId": "123456789012", "protocol": "HTTP/1.1", "stage": "prod", "domainPrefix": "puhdx84jy9", "requestTimeEpoch": 1718635693506, "requestId": "f88e38e3-2060-4a56-93c0-9efbc6a659a0", "identity": { "cognitoIdentityPoolId": null, "accountId": null, "cognitoIdentityId": null, "caller": null, "sourceIp": "15.248.3.126", "principalOrgId": null, "accessKey": null, "cognitoAuthenticationType": null, "cognitoAuthenticationProvider": null, "userArn": null, "userAgent": "HTTPie/3.2.2", "user": null }, "domainName": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "deploymentId": "v99qix", "apiId": "puhdx84jy9" }, "body": null, "isBase64Encoded": false }Lambda Authorizer in token mode
POST /lambda-tokenfor Lambda authorizer set with token authorizerRequest:
Payload received by authorizer:
Details
{ "type": "TOKEN", "methodArn": "arn:aws:execute-api:eu-west-1:123456789012:puhdx84jy9/prod/POST/lambda-token", "authorizationToken": "Bearer foo" }Payload received by handler (after auth):
Details
{ "resource": "/lambda-token", "path": "/lambda-token", "httpMethod": "POST", "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Authorization": "Bearer foo", "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-ASN": "7224", "CloudFront-Viewer-Country": "GB", "Host": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "User-Agent": "HTTPie/3.2.2", "Via": "1.1 8313bbb5b34d1ea0742b64ffbb83b692.cloudfront.net (CloudFront)", "X-Amz-Cf-Id": "lrbUQoVv2blphI3jBSXQNqA3oq4s8VCCimuaSxMrX4YbEZjVKWaLWg==", "X-Amzn-Trace-Id": "Root=1-66704db9-6136092d02f4e3424fe2ce95", "X-Forwarded-For": "15.248.3.126, 130.176.209.10", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" }, "multiValueHeaders": { "Accept": [ "*/*" ], "Accept-Encoding": [ "gzip, deflate" ], "Authorization": [ "Bearer foo" ], "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-ASN": [ "7224" ], "CloudFront-Viewer-Country": [ "GB" ], "Host": [ "puhdx84jy9.execute-api.eu-west-1.amazonaws.com" ], "User-Agent": [ "HTTPie/3.2.2" ], "Via": [ "1.1 8313bbb5b34d1ea0742b64ffbb83b692.cloudfront.net (CloudFront)" ], "X-Amz-Cf-Id": [ "lrbUQoVv2blphI3jBSXQNqA3oq4s8VCCimuaSxMrX4YbEZjVKWaLWg==" ], "X-Amzn-Trace-Id": [ "Root=1-66704db9-6136092d02f4e3424fe2ce95" ], "X-Forwarded-For": [ "15.248.3.126, 130.176.209.10" ], "X-Forwarded-Port": [ "443" ], "X-Forwarded-Proto": [ "https" ] }, "queryStringParameters": null, "multiValueQueryStringParameters": null, "pathParameters": null, "stageVariables": null, "requestContext": { "resourceId": "nmnny7", "authorizer": { "principalId": "user", "integrationLatency": 422 }, "resourcePath": "/lambda-token", "httpMethod": "POST", "extendedRequestId": "ZhEVGHTzDoEEB2A=", "requestTime": "17/Jun/2024:14:52:41 +0000", "path": "/prod/lambda-token", "accountId": "123456789012", "protocol": "HTTP/1.1", "stage": "prod", "domainPrefix": "puhdx84jy9", "requestTimeEpoch": 1718635961959, "requestId": "3c177581-2d03-4af4-9b68-5924083f37fe", "identity": { "cognitoIdentityPoolId": null, "accountId": null, "cognitoIdentityId": null, "caller": null, "sourceIp": "15.248.3.126", "principalOrgId": null, "accessKey": null, "cognitoAuthenticationType": null, "cognitoAuthenticationProvider": null, "userArn": null, "userAgent": "HTTPie/3.2.2", "user": null }, "domainName": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "deploymentId": "v99qix", "apiId": "puhdx84jy9" }, "body": null, "isBase64Encoded": false }Lambda Authorizer in Request mode
POST /lambda-requestfor Lambda authorizer set with request authorizerRequest:
Payload received by authorizer:
Details
{ "type": "REQUEST", "methodArn": "arn:aws:execute-api:eu-west-1:123456789012:puhdx84jy9/prod/POST/lambda-request", "resource": "/lambda-request", "path": "/lambda-request", "httpMethod": "POST", "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Authorization": "Bearer foo", "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-ASN": "7224", "CloudFront-Viewer-Country": "GB", "Content-Length": "0", "Host": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "User-Agent": "HTTPie/3.2.2", "Via": "1.1 e20527248be1eebaced63108ab7e73d6.cloudfront.net (CloudFront)", "X-Amz-Cf-Id": "sIEfafSQxwenKloeWOp-4eyo_-grMyVNzwnkBmx5q7OcvBJV7knerQ==", "X-Amzn-Trace-Id": "Root=1-66704feb-118151122b2ad2d3488844e7", "X-Forwarded-For": "15.248.3.126, 130.176.209.37", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" }, "multiValueHeaders": { "Accept": [ "*/*" ], "Accept-Encoding": [ "gzip, deflate" ], "Authorization": [ "Bearer foo" ], "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-ASN": [ "7224" ], "CloudFront-Viewer-Country": [ "GB" ], "Content-Length": [ "0" ], "Host": [ "puhdx84jy9.execute-api.eu-west-1.amazonaws.com" ], "User-Agent": [ "HTTPie/3.2.2" ], "Via": [ "1.1 e20527248be1eebaced63108ab7e73d6.cloudfront.net (CloudFront)" ], "X-Amz-Cf-Id": [ "sIEfafSQxwenKloeWOp-4eyo_-grMyVNzwnkBmx5q7OcvBJV7knerQ==" ], "X-Amzn-Trace-Id": [ "Root=1-66704feb-118151122b2ad2d3488844e7" ], "X-Forwarded-For": [ "15.248.3.126, 130.176.209.37" ], "X-Forwarded-Port": [ "443" ], "X-Forwarded-Proto": [ "https" ] }, "queryStringParameters": {}, "multiValueQueryStringParameters": {}, "pathParameters": {}, "stageVariables": {}, "requestContext": { "resourceId": "w567jh", "resourcePath": "/lambda-request", "httpMethod": "POST", "extendedRequestId": "ZhFsxGQDDoEEMig=", "requestTime": "17/Jun/2024:15:02:03 +0000", "path": "/prod/lambda-request", "accountId": "123456789012", "protocol": "HTTP/1.1", "stage": "prod", "domainPrefix": "puhdx84jy9", "requestTimeEpoch": 1718636523035, "requestId": "141d6671-99b4-40ca-9997-7a22f01eac74", "identity": { "cognitoIdentityPoolId": null, "accountId": null, "cognitoIdentityId": null, "caller": null, "sourceIp": "15.248.3.126", "principalOrgId": null, "accessKey": null, "cognitoAuthenticationType": null, "cognitoAuthenticationProvider": null, "userArn": null, "userAgent": "HTTPie/3.2.2", "user": null }, "domainName": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "deploymentId": "v99qix", "apiId": "puhdx84jy9" } }Payload received by handler (after auth):
Details
{ "resource": "/lambda-request", "path": "/lambda-request", "httpMethod": "POST", "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Authorization": "Bearer foo", "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-ASN": "7224", "CloudFront-Viewer-Country": "GB", "Host": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "User-Agent": "HTTPie/3.2.2", "Via": "1.1 e20527248be1eebaced63108ab7e73d6.cloudfront.net (CloudFront)", "X-Amz-Cf-Id": "sIEfafSQxwenKloeWOp-4eyo_-grMyVNzwnkBmx5q7OcvBJV7knerQ==", "X-Amzn-Trace-Id": "Root=1-66704feb-118151122b2ad2d3488844e7", "X-Forwarded-For": "15.248.3.126, 130.176.209.37", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" }, "multiValueHeaders": { "Accept": [ "*/*" ], "Accept-Encoding": [ "gzip, deflate" ], "Authorization": [ "Bearer foo" ], "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-ASN": [ "7224" ], "CloudFront-Viewer-Country": [ "GB" ], "Host": [ "puhdx84jy9.execute-api.eu-west-1.amazonaws.com" ], "User-Agent": [ "HTTPie/3.2.2" ], "Via": [ "1.1 e20527248be1eebaced63108ab7e73d6.cloudfront.net (CloudFront)" ], "X-Amz-Cf-Id": [ "sIEfafSQxwenKloeWOp-4eyo_-grMyVNzwnkBmx5q7OcvBJV7knerQ==" ], "X-Amzn-Trace-Id": [ "Root=1-66704feb-118151122b2ad2d3488844e7" ], "X-Forwarded-For": [ "15.248.3.126, 130.176.209.37" ], "X-Forwarded-Port": [ "443" ], "X-Forwarded-Proto": [ "https" ] }, "queryStringParameters": null, "multiValueQueryStringParameters": null, "pathParameters": null, "stageVariables": null, "requestContext": { "resourceId": "w567jh", "authorizer": { "principalId": "user", "integrationLatency": 573 }, "resourcePath": "/lambda-request", "httpMethod": "POST", "extendedRequestId": "ZhFsxGQDDoEEMig=", "requestTime": "17/Jun/2024:15:02:03 +0000", "path": "/prod/lambda-request", "accountId": "123456789012", "protocol": "HTTP/1.1", "stage": "prod", "domainPrefix": "puhdx84jy9", "requestTimeEpoch": 1718636523035, "requestId": "141d6671-99b4-40ca-9997-7a22f01eac74", "identity": { "cognitoIdentityPoolId": null, "accountId": null, "cognitoIdentityId": null, "caller": null, "sourceIp": "15.248.3.126", "principalOrgId": null, "accessKey": null, "cognitoAuthenticationType": null, "cognitoAuthenticationProvider": null, "userArn": null, "userAgent": "HTTPie/3.2.2", "user": null }, "domainName": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "deploymentId": "v99qix", "apiId": "puhdx84jy9" }, "body": null, "isBase64Encoded": false }IAM Auth
POST /iamfor IAM authRequest:
Payload received by handler:
Details
{ "resource": "/iam", "path": "/iam", "httpMethod": "POST", "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "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-ASN": "7224", "CloudFront-Viewer-Country": "GB", "Host": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "User-Agent": "HTTPie/3.2.2", "Via": "1.1 d3e65123eab254da0d61a912409e06b4.cloudfront.net (CloudFront)", "X-Amz-Cf-Id": "tP3wYavwGbIRVlinJVTXtHLSXkXwPi6WYz7EarjB1QnsqC0giphxmA==", "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "x-amz-date": "20240617T145824Z", "X-Amz-Security-Token": "IQoJb3JpZ[...]==", "X-Amzn-Trace-Id": "Root=1-66704f11-56b0f1d611b392cb68ad2b83", "X-Forwarded-For": "15.248.3.126, 130.176.209.38", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" }, "multiValueHeaders": { "Accept": [ "*/*" ], "Accept-Encoding": [ "gzip, deflate" ], "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-ASN": [ "7224" ], "CloudFront-Viewer-Country": [ "GB" ], "Host": [ "puhdx84jy9.execute-api.eu-west-1.amazonaws.com" ], "User-Agent": [ "HTTPie/3.2.2" ], "Via": [ "1.1 d3e65123eab254da0d61a912409e06b4.cloudfront.net (CloudFront)" ], "X-Amz-Cf-Id": [ "tP3wYavwGbIRVlinJVTXtHLSXkXwPi6WYz7EarjB1QnsqC0giphxmA==" ], "x-amz-content-sha256": [ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ], "x-amz-date": [ "20240617T145824Z" ], "X-Amz-Security-Token": [ "IQoJb3JpZ[...]==" ], "X-Amzn-Trace-Id": [ "Root=1-66704f11-56b0f1d611b392cb68ad2b83" ], "X-Forwarded-For": [ "15.248.3.126, 130.176.209.38" ], "X-Forwarded-Port": [ "443" ], "X-Forwarded-Proto": [ "https" ] }, "queryStringParameters": null, "multiValueQueryStringParameters": null, "pathParameters": null, "stageVariables": null, "requestContext": { "resourceId": "f6ylys", "resourcePath": "/iam", "httpMethod": "POST", "extendedRequestId": "ZhFKtGnnDoEEMig=", "requestTime": "17/Jun/2024:14:58:25 +0000", "path": "/prod/iam", "accountId": "123456789012", "protocol": "HTTP/1.1", "stage": "prod", "domainPrefix": "puhdx84jy9", "requestTimeEpoch": 1718636305078, "requestId": "89f9261a-2765-4d49-b72e-f76726991e44", "identity": { "cognitoIdentityPoolId": null, "accountId": "123456789012", "cognitoIdentityId": null, "caller": "ABCAXZWZ5ZDPNIH6C6ODK:aamorosi", "sourceIp": "15.248.3.126", "principalOrgId": null, "accessKey": "ABCAXZWZ5ZDPIFV7JHWH", "cognitoAuthenticationType": null, "cognitoAuthenticationProvider": null, "userArn": "arn:aws:sts::123456789012:assumed-role/Admin/aamorosi", "userAgent": "HTTPie/3.2.2", "user": "ABCAXZWZ5ZDPNIH6C6ODK:aamorosi" }, "domainName": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "deploymentId": "v99qix", "apiId": "puhdx84jy9" }, "body": null, "isBase64Encoded": false }JWT Auth (backed by Cognito)
POST /cognitofor JWT auth using Cognito as issuerRequest:
Payload received by handler:
Details
{ "resource": "/cognito", "path": "/cognito", "httpMethod": "POST", "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Authorization": "Bearer eyJraWQiOiJadVlaXC9KdmtST2hpN1hBT3FIekx0TVwvdUpKXC9kWUtPMUs1QkVZSjVUM2xZPSIsImFsZyI6IlJTMjU2In0.eyJvcmlnaW5fanRpIjoiMzdjYzAyY2YtNWMxNC00NjM2LWJlYjMtNGY4Y2E4ODc5MzViIiwic3ViIjoiZDJmNTA0NDQtMDA0MS03MDM2LWFlYTItYTk1NWZjYTMzZDM3IiwiYXVkIjoiM25rb2VwNDE1MWI3dW1lZ2dub3R0YzMwdTkiLCJldmVudF9pZCI6ImM3ZjZjYzYyLWM0NzYtNGM2YS1iYTViLTc0NTI0NGRmZTVlZSIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNzE4NjM2NDA0LCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAuZXUtd2VzdC0xLmFtYXpvbmF3cy5jb21cL2V1LXdlc3QtMV95MGJMRzRpMjciLCJjb2duaXRvOnVzZXJuYW1lIjoiYWFtb3Jvc2kiLCJleHAiOjE3MTg3MjI4MDQsImlhdCI6MTcxODYzNjQwNCwianRpIjoiMTM3MjdhYmEtODllNi00ODk2LWJkOWUtOGNiYzBmNDc4ZjljIn0.k9GKFY028MbL8hyLpsq2aCsMYt0P_im93qSyDF5awnhePlnfpNVXGXGGIcoBPyj-wlsZPdJAS_3Y324VhYlRzX76xTlew1lAtM665RAe4tncLl6MFlicTgHqsFXeOyXroSAe_X9wlP1jfMGiqW6oOkxrl_dajz7GJFFTEX8ztnTLD7FZvE5KophYihxq6RFZlOQFLWmx6w378ZQ49kHg-H5FF6JluI1G9sQ3P77rrhfL7MGv5xi1YiDeWa7T27PhHcgqll9fuLFA-_8LrdN-G5XMEt0Zlfb-WxF8YaStJ4e519GfnVWUuNWJo9BnFj0ChCiyhlK7cAWDjm1mz-Y4FA", "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-ASN": "7224", "CloudFront-Viewer-Country": "GB", "Host": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "User-Agent": "HTTPie/3.2.2", "Via": "1.1 ff7cafeac35b91a7af23c56e3b9691e8.cloudfront.net (CloudFront)", "X-Amz-Cf-Id": "zTKRjCprnRv8GXztLX3l3gQVmT0MLysk_-FcFmxxBfz0qSPCBQsGIg==", "X-Amzn-Trace-Id": "Root=1-66704f8a-626bb89a0b2bf33b547f581c", "X-Forwarded-For": "15.248.3.126, 130.176.209.4", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https" }, "multiValueHeaders": { "Accept": [ "*/*" ], "Accept-Encoding": [ "gzip, deflate" ], "Authorization": [ "Bearer eyJraWQiOiJadVlaXC9KdmtST2hpN1hBT3FIekx0TVwvdUpKXC9kWUtPMUs1QkVZSjVUM2xZPSIsImFsZyI6IlJTMjU2In0.eyJvcmlnaW5fanRpIjoiMzdjYzAyY2YtNWMxNC00NjM2LWJlYjMtNGY4Y2E4ODc5MzViIiwic3ViIjoiZDJmNTA0NDQtMDA0MS03MDM2LWFlYTItYTk1NWZjYTMzZDM3IiwiYXVkIjoiM25rb2VwNDE1MWI3dW1lZ2dub3R0YzMwdTkiLCJldmVudF9pZCI6ImM3ZjZjYzYyLWM0NzYtNGM2YS1iYTViLTc0NTI0NGRmZTVlZSIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNzE4NjM2NDA0LCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAuZXUtd2VzdC0xLmFtYXpvbmF3cy5jb21cL2V1LXdlc3QtMV95MGJMRzRpMjciLCJjb2duaXRvOnVzZXJuYW1lIjoiYWFtb3Jvc2kiLCJleHAiOjE3MTg3MjI4MDQsImlhdCI6MTcxODYzNjQwNCwianRpIjoiMTM3MjdhYmEtODllNi00ODk2LWJkOWUtOGNiYzBmNDc4ZjljIn0.k9GKFY028MbL8hyLpsq2aCsMYt0P_im93qSyDF5awnhePlnfpNVXGXGGIcoBPyj-wlsZPdJAS_3Y324VhYlRzX76xTlew1lAtM665RAe4tncLl6MFlicTgHqsFXeOyXroSAe_X9wlP1jfMGiqW6oOkxrl_dajz7GJFFTEX8ztnTLD7FZvE5KophYihxq6RFZlOQFLWmx6w378ZQ49kHg-H5FF6JluI1G9sQ3P77rrhfL7MGv5xi1YiDeWa7T27PhHcgqll9fuLFA-_8LrdN-G5XMEt0Zlfb-WxF8YaStJ4e519GfnVWUuNWJo9BnFj0ChCiyhlK7cAWDjm1mz-Y4FA" ], "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-ASN": [ "7224" ], "CloudFront-Viewer-Country": [ "GB" ], "Host": [ "puhdx84jy9.execute-api.eu-west-1.amazonaws.com" ], "User-Agent": [ "HTTPie/3.2.2" ], "Via": [ "1.1 ff7cafeac35b91a7af23c56e3b9691e8.cloudfront.net (CloudFront)" ], "X-Amz-Cf-Id": [ "zTKRjCprnRv8GXztLX3l3gQVmT0MLysk_-FcFmxxBfz0qSPCBQsGIg==" ], "X-Amzn-Trace-Id": [ "Root=1-66704f8a-626bb89a0b2bf33b547f581c" ], "X-Forwarded-For": [ "15.248.3.126, 130.176.209.4" ], "X-Forwarded-Port": [ "443" ], "X-Forwarded-Proto": [ "https" ] }, "queryStringParameters": null, "multiValueQueryStringParameters": null, "pathParameters": null, "stageVariables": null, "requestContext": { "resourceId": "5x3n2k", "authorizer": { "claims": { "origin_jti": "37cc02cf-5c14-4636-beb3-4f8ca887935b", "sub": "d2f50444-0041-7036-aea2-a955fca33d37", "aud": "3nkoep4151b7umeggnottc30u9", "event_id": "c7f6cc62-c476-4c6a-ba5b-745244dfe5ee", "token_use": "id", "auth_time": "1718636404", "iss": "https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_y0bLG4i27", "cognito:username": "aamorosi", "exp": "Tue Jun 18 15:00:04 UTC 2024", "iat": "Mon Jun 17 15:00:04 UTC 2024", "jti": "13727aba-89e6-4896-bd9e-8cbc0f478f9c" } }, "resourcePath": "/cognito", "httpMethod": "POST", "extendedRequestId": "ZhFduHZrDoEEORQ=", "requestTime": "17/Jun/2024:15:00:26 +0000", "path": "/prod/cognito", "accountId": "123456789012", "protocol": "HTTP/1.1", "stage": "prod", "domainPrefix": "puhdx84jy9", "requestTimeEpoch": 1718636426760, "requestId": "e56434a3-0b5d-453c-9183-f07a5e91fbb3", "identity": { "cognitoIdentityPoolId": null, "accountId": null, "cognitoIdentityId": null, "caller": null, "sourceIp": "15.248.3.126", "principalOrgId": null, "accessKey": null, "cognitoAuthenticationType": null, "cognitoAuthenticationProvider": null, "userArn": null, "userAgent": "HTTPie/3.2.2", "user": null }, "domainName": "puhdx84jy9.execute-api.eu-west-1.amazonaws.com", "deploymentId": "v99qix", "apiId": "puhdx84jy9" }, "body": null, "isBase64Encoded": false }Invoke via Test UI
Request:
Via AWS Management Console, selected
/no-authroute and ran a test with default values.Payload received by handler:
Details
{ "resource": "/no-auth", "path": "/no-auth", "httpMethod": "POST", "headers": null, "multiValueHeaders": null, "queryStringParameters": null, "multiValueQueryStringParameters": null, "pathParameters": null, "stageVariables": null, "requestContext": { "resourceId": "3nq1cq", "resourcePath": "/no-auth", "httpMethod": "POST", "extendedRequestId": "ZhGnYGtqjoEFyzw=", "requestTime": "17/Jun/2024:15:08:18 +0000", "path": "/no-auth", "accountId": "123456789012", "protocol": "HTTP/1.1", "stage": "test-invoke-stage", "domainPrefix": "testPrefix", "requestTimeEpoch": 1718636898112, "requestId": "28422e1a-c975-42da-895e-165f882dafef", "identity": { "cognitoIdentityPoolId": null, "cognitoIdentityId": null, "apiKey": "test-invoke-api-key", "principalOrgId": null, "cognitoAuthenticationType": null, "userArn": "arn:aws:sts::123456789012:assumed-role/Admin/aamorosi", "apiKeyId": "test-invoke-api-key-id", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15", "accountId": "123456789012", "caller": "ABCAXZWZ5ZDPNIH6C6ODK:aamorosi", "sourceIp": "test-invoke-source-ip", "accessKey": "ABCAXZWZ5ZDPFDRIWYXX", "cognitoAuthenticationProvider": null, "user": "ABCAXZWZ5ZDPNIH6C6ODK:aamorosi" }, "domainName": "testPrefix.testDomainName", "apiId": "puhdx84jy9" }, "body": null, "isBase64Encoded": false }HTTP API (v2)
No auth
Request:
Payload received by handler:
Details
{ "version": "2.0", "routeKey": "POST /no-auth", "rawPath": "/no-auth", "rawQueryString": "", "headers": { "accept": "*/*", "accept-encoding": "gzip, deflate", "content-length": "0", "host": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "user-agent": "HTTPie/3.2.2", "x-amzn-trace-id": "Root=1-66705682-56e180fe1f2a92701bc6e778", "x-forwarded-for": "15.248.3.126", "x-forwarded-port": "443", "x-forwarded-proto": "https" }, "requestContext": { "accountId": "123456789012", "apiId": "lsw1ro4ipb", "domainName": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "domainPrefix": "lsw1ro4ipb", "http": { "method": "POST", "path": "/no-auth", "protocol": "HTTP/1.1", "sourceIp": "15.248.3.126", "userAgent": "HTTPie/3.2.2" }, "requestId": "ZhJ0fhjPDoEEPqw=", "routeKey": "POST /no-auth", "stage": "$default", "time": "17/Jun/2024:15:30:10 +0000", "timeEpoch": 1718638210871 }, "isBase64Encoded": false }No auth w/ payload version 1 (compat mode)
Request:
Payload received by handler:
Details
{ "version": "1.0", "resource": "/no-auth-v1-payload", "path": "/no-auth-v1-payload", "httpMethod": "POST", "headers": { "Content-Length": "0", "Host": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "User-Agent": "HTTPie/3.2.2", "X-Amzn-Trace-Id": "Root=1-6670578b-6e5db6e62953c65e6e72b81d", "X-Forwarded-For": "15.248.3.126", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https", "accept": "*/*", "accept-encoding": "gzip, deflate" }, "multiValueHeaders": { "Content-Length": [ "0" ], "Host": [ "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com" ], "User-Agent": [ "HTTPie/3.2.2" ], "X-Amzn-Trace-Id": [ "Root=1-6670578b-6e5db6e62953c65e6e72b81d" ], "X-Forwarded-For": [ "15.248.3.126" ], "X-Forwarded-Port": [ "443" ], "X-Forwarded-Proto": [ "https" ], "accept": [ "*/*" ], "accept-encoding": [ "gzip, deflate" ] }, "queryStringParameters": null, "multiValueQueryStringParameters": null, "requestContext": { "accountId": "123456789012", "apiId": "lsw1ro4ipb", "domainName": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "domainPrefix": "lsw1ro4ipb", "extendedRequestId": "ZhKd1gcfDoEEP9A=", "httpMethod": "POST", "identity": { "accessKey": null, "accountId": null, "caller": null, "cognitoAmr": null, "cognitoAuthenticationProvider": null, "cognitoAuthenticationType": null, "cognitoIdentityId": null, "cognitoIdentityPoolId": null, "principalOrgId": null, "sourceIp": "15.248.3.126", "user": null, "userAgent": "HTTPie/3.2.2", "userArn": null }, "path": "/no-auth-v1-payload", "protocol": "HTTP/1.1", "requestId": "ZhKd1gcfDoEEP9A=", "requestTime": "17/Jun/2024:15:34:35 +0000", "requestTimeEpoch": 1718638475467, "resourceId": "POST /no-auth-v1-payload", "resourcePath": "/no-auth-v1-payload", "stage": "$default" }, "pathParameters": null, "stageVariables": null, "body": null, "isBase64Encoded": false }IAM Auth
Request:
Payload received by handler:
Details
{ "version": "2.0", "routeKey": "POST /iam", "rawPath": "/iam", "rawQueryString": "", "headers": { "accept": "*/*", "accept-encoding": "gzip, deflate", "authorization": "AWS4-HMAC-SHA256 Credential=ABCAXZWZ5ZDPIFV7JHWH/20240617/eu-west-1/execute-api/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=2ec027cabfd1c83da3a0f7d53f5edfda4bb30469be552966303bdbe7fda5ad6d", "content-length": "0", "host": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "user-agent": "HTTPie/3.2.2", "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "x-amz-date": "20240617T153941Z", "x-amz-security-token": "IQoJb3JpZ2luX2Vj[...]==", "x-amzn-trace-id": "Root=1-667058bd-3265707259baa0695cdc20c5", "x-forwarded-for": "15.248.3.126", "x-forwarded-port": "443", "x-forwarded-proto": "https" }, "requestContext": { "accountId": "123456789012", "apiId": "lsw1ro4ipb", "authorizer": { "iam": { "accessKey": "ABCAXZWZ5ZDPIFV7JHWH", "accountId": "123456789012", "callerId": "ABCAXZWZ5ZDPNIH6C6ODK:aamorosi", "cognitoIdentity": null, "principalOrgId": null, "userArn": "arn:aws:sts::123456789012:assumed-role/Admin/aamorosi", "userId": "ABCOAXZWZ5ZDPNIH6C6ODK:aamorosi" } }, "domainName": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "domainPrefix": "lsw1ro4ipb", "http": { "method": "POST", "path": "/iam", "protocol": "HTTP/1.1", "sourceIp": "15.248.3.126", "userAgent": "HTTPie/3.2.2" }, "requestId": "ZhLNpgotDoEEJUQ=", "routeKey": "POST /iam", "stage": "$default", "time": "17/Jun/2024:15:39:41 +0000", "timeEpoch": 1718638781472 }, "isBase64Encoded": false }JWT Auth (Cognito)
Request:
Payload received by handler (after auth):
Details
{ "version": "2.0", "routeKey": "POST /cognito", "rawPath": "/cognito", "rawQueryString": "", "headers": { "accept": "*/*", "accept-encoding": "gzip, deflate", "authorization": "Bearer eyJra[...]A", "content-length": "0", "host": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "user-agent": "HTTPie/3.2.2", "x-amzn-trace-id": "Root=1-66705b09-5f85233d2fb7bd54034f7e30", "x-forwarded-for": "15.248.3.126", "x-forwarded-port": "443", "x-forwarded-proto": "https" }, "requestContext": { "accountId": "123456789012", "apiId": "lsw1ro4ipb", "authorizer": { "jwt": { "claims": { "aud": "3nkoep4151b7umeggnottc30u9", "auth_time": "1718636404", "cognito:username": "aamorosi", "event_id": "c7f6cc62-c476-4c6a-ba5b-745244dfe5ee", "exp": "1718722804", "iat": "1718636404", "iss": "https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_y0bLG4i27", "jti": "13727aba-89e6-4896-bd9e-8cbc0f478f9c", "origin_jti": "37cc02cf-5c14-4636-beb3-4f8ca887935b", "sub": "d2f50444-0041-7036-aea2-a955fca33d37", "token_use": "id" }, "scopes": null } }, "domainName": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "domainPrefix": "lsw1ro4ipb", "http": { "method": "POST", "path": "/cognito", "protocol": "HTTP/1.1", "sourceIp": "15.248.3.126", "userAgent": "HTTPie/3.2.2" }, "requestId": "ZhMpgigvDoEEPlg=", "routeKey": "POST /cognito", "stage": "$default", "time": "17/Jun/2024:15:49:29 +0000", "timeEpoch": 1718639369348 }, "isBase64Encoded": false }Lambda authorizer
Request:
Payload received by authorizer:
Details
{ "version": "2.0", "type": "REQUEST", "routeArn": "arn:aws:execute-api:eu-west-1:123456789012:lsw1ro4ipb/$default/POST/lambda", "identitySource": [ "Bearer foo" ], "routeKey": "POST /lambda", "rawPath": "/lambda", "rawQueryString": "", "headers": { "accept": "*/*", "accept-encoding": "gzip, deflate", "authorization": "Bearer foo", "content-length": "0", "host": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "user-agent": "HTTPie/3.2.2", "x-amzn-trace-id": "Root=1-66705bc7-2b4257df30cbee696ef2cf28", "x-forwarded-for": "15.248.3.126", "x-forwarded-port": "443", "x-forwarded-proto": "https" }, "requestContext": { "accountId": "123456789012", "apiId": "lsw1ro4ipb", "domainName": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "domainPrefix": "lsw1ro4ipb", "http": { "method": "POST", "path": "/lambda", "protocol": "HTTP/1.1", "sourceIp": "15.248.3.126", "userAgent": "HTTPie/3.2.2" }, "requestId": "ZhNHJhhLjoEEPiw=", "routeKey": "POST /lambda", "stage": "$default", "time": "17/Jun/2024:15:52:39 +0000", "timeEpoch": 1718639559080 } }Payload received by handler (after auth):
Details
{ "version": "2.0", "routeKey": "POST /lambda", "rawPath": "/lambda", "rawQueryString": "", "headers": { "accept": "*/*", "accept-encoding": "gzip, deflate", "authorization": "Bearer foo", "content-length": "0", "host": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "user-agent": "HTTPie/3.2.2", "x-amzn-trace-id": "Root=1-66705bc7-2b4257df30cbee696ef2cf28", "x-forwarded-for": "15.248.3.126", "x-forwarded-port": "443", "x-forwarded-proto": "https" }, "requestContext": { "accountId": "123456789012", "apiId": "lsw1ro4ipb", "authorizer": { "lambda": null }, "domainName": "lsw1ro4ipb.execute-api.eu-west-1.amazonaws.com", "domainPrefix": "lsw1ro4ipb", "http": { "method": "POST", "path": "/lambda", "protocol": "HTTP/1.1", "sourceIp": "15.248.3.126", "userAgent": "HTTPie/3.2.2" }, "requestId": "ZhNHJhhLjoEEPiw=", "routeKey": "POST /lambda", "stage": "$default", "time": "17/Jun/2024:15:52:39 +0000", "timeEpoch": 1718639559080 }, "isBase64Encoded": false }github-actions commentedon Jun 26, 2024
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
github-actions commentedon Jun 27, 2024
This is now released under v2.3.0 version!