{"pageProps":{"post":{"mdxSource":"var Component=(()=>{var d=Object.create;var l=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var k=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),y=(a,e)=>{for(var s in e)l(a,s,{get:e[s],enumerable:!0})},t=(a,e,s,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let c of h(e))!u.call(a,c)&&c!==s&&l(a,c,{get:()=>e[c],enumerable:!(r=m(e,c))||r.enumerable});return a};var g=(a,e,s)=>(s=a!=null?d(N(a)):{},t(e||!a||!a.__esModule?l(s,\"default\",{value:a,enumerable:!0}):s,a)),w=a=>t(l({},\"__esModule\",{value:!0}),a);var p=k((I,o)=>{o.exports=_jsx_runtime});var x={};y(x,{default:()=>f,frontmatter:()=>b});var n=g(p()),b={slug:\"pass-querystring-lambda\",date:new Date(16708896e5),title:\"How to pass API Gateway query parameters to AWS Lambda?\",tags:[\"AWS\",\"Serverless\",\"Lambda\"],summary:\"Learn how to pass API Gateway query parameters to AWS Lambda\",authors:[\"tlakomy\"]};function i(a){let e=Object.assign({p:\"p\",a:\"a\",code:\"code\",pre:\"pre\",span:\"span\"},a.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.p,{children:[\"First - make sure that you have \",(0,n.jsx)(e.a,{href:\"https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html\",children:\"set up Lambda proxy integration in API Gateway\"}),\". Once that's done, you can access API Gateway parameters such as \",(0,n.jsx)(e.code,{children:\"queryStringParameters\"}),\" or \",(0,n.jsx)(e.code,{children:\"pathParameters\"}),\" in your Lambda function by using the \",(0,n.jsx)(e.code,{children:\"event\"}),\" object.\"]}),`\n`,(0,n.jsx)(e.p,{children:\"Here's a Node.js example:\"}),`\n`,(0,n.jsx)(e.pre,{className:\"language-js\",children:(0,n.jsxs)(e.code,{className:\"language-js code-highlight\",children:[(0,n.jsxs)(e.span,{className:\"code-line\",children:[(0,n.jsx)(e.span,{className:\"token maybe-class-name\",children:\"Copy\"}),` code\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\"exports\",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\".\"}),(0,n.jsx)(e.span,{className:\"token method-variable function-variable method function property-access\",children:\"handler\"}),\" \",(0,n.jsx)(e.span,{className:\"token operator\",children:\"=\"}),\" \",(0,n.jsx)(e.span,{className:\"token keyword\",children:\"async\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"(\"}),(0,n.jsx)(e.span,{className:\"token parameter\",children:\"event\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\")\"}),\" \",(0,n.jsx)(e.span,{className:\"token arrow operator\",children:\"=>\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token comment\",children:\"// Get the querystring and route parameters from the event\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token keyword\",children:\"const\"}),\" queryParams \",(0,n.jsx)(e.span,{className:\"token operator\",children:\"=\"}),\" event\",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\".\"}),(0,n.jsx)(e.span,{className:\"token property-access\",children:\"queryStringParameters\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\";\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token keyword\",children:\"const\"}),\" routeParams \",(0,n.jsx)(e.span,{className:\"token operator\",children:\"=\"}),\" event\",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\".\"}),(0,n.jsx)(e.span,{className:\"token property-access\",children:\"pathParameters\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\";\"}),`\n`]}),(0,n.jsx)(e.span,{className:\"code-line\",children:`\n`}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token comment\",children:\"// Use the querystring and route parameters in your logic\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token comment\",children:\"// ...\"}),`\n`]}),(0,n.jsx)(e.span,{className:\"code-line\",children:`\n`}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token comment\",children:\"// Return a response\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token keyword control-flow\",children:\"return\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token literal-property property\",children:\"statusCode\"}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token number\",children:\"200\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token literal-property property\",children:\"body\"}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token known-class-name class-name\",children:\"JSON\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\".\"}),(0,n.jsx)(e.span,{className:\"token method function property-access\",children:\"stringify\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"(\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token comment\",children:\"// Data to return in the response\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\")\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\";\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\";\"}),`\n`]})]})}),`\n`,(0,n.jsxs)(e.p,{children:[\"The following example \",(0,n.jsx)(e.a,{href:\"https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html\",children:\"from AWS docs\"}),\" shows the structure of an event that API Gateway sends to a Lambda proxy integration:\"]}),`\n`,(0,n.jsx)(e.pre,{className:\"language-json\",children:(0,n.jsxs)(e.code,{className:\"language-json code-highlight\",children:[(0,n.jsxs)(e.span,{className:\"code-line\",children:[(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"resource\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"/my/path\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"path\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"/my/path\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"httpMethod\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"GET\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"headers\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"header1\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"value1\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"header2\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"value2\"'}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"multiValueHeaders\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"header1\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"[\"}),(0,n.jsx)(e.span,{className:\"token string\",children:'\"value1\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"]\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"header2\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"[\"}),(0,n.jsx)(e.span,{className:\"token string\",children:'\"value1\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"value2\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"]\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"queryStringParameters\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"parameter1\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"value1\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"parameter2\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"value\"'}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"multiValueQueryStringParameters\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"parameter1\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"[\"}),(0,n.jsx)(e.span,{className:\"token string\",children:'\"value1\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"value2\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"]\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"parameter2\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"[\"}),(0,n.jsx)(e.span,{className:\"token string\",children:'\"value\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"]\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"requestContext\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"accountId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"123456789012\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"apiId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"id\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"authorizer\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"claims\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"scopes\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"domainName\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"id.execute-api.us-east-1.amazonaws.com\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"domainPrefix\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"id\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"extendedRequestId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"request-id\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"httpMethod\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"GET\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"identity\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"accessKey\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"accountId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"caller\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"cognitoAuthenticationProvider\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"cognitoAuthenticationType\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"cognitoIdentityId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"cognitoIdentityPoolId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"principalOrgId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"sourceIp\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"IP\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"user\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"userAgent\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"user-agent\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"userArn\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"clientCert\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"clientCertPem\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"CERT_CONTENT\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"subjectDN\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"www.example.com\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"issuerDN\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"Example issuer\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"serialNumber\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"validity\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"{\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"notBefore\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"May 28 12:30:02 2019 GMT\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"notAfter\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"Aug 5 09:36:04 2021 GMT\"'}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"path\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"/my/path\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"protocol\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"HTTP/1.1\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"requestId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"id=\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"requestTime\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"04/Mar/2020:19:15:17 +0000\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"requestTimeEpoch\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token number\",children:\"1583349317135\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"resourceId\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"resourcePath\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"/my/path\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"stage\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"$default\"'}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"pathParameters\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"stageVariables\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token null keyword\",children:\"null\"}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"body\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token string\",children:'\"Hello from Lambda!\"'}),(0,n.jsx)(e.span,{className:\"token punctuation\",children:\",\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[\" \",(0,n.jsx)(e.span,{className:\"token property\",children:'\"isBase64Encoded\"'}),(0,n.jsx)(e.span,{className:\"token operator\",children:\":\"}),\" \",(0,n.jsx)(e.span,{className:\"token boolean\",children:\"false\"}),`\n`]}),(0,n.jsxs)(e.span,{className:\"code-line\",children:[(0,n.jsx)(e.span,{className:\"token punctuation\",children:\"}\"}),`\n`]})]})})]})}function v(a={}){let{wrapper:e}=a.components||{};return e?(0,n.jsx)(e,Object.assign({},a,{children:(0,n.jsx)(i,a)})):i(a)}var f=v;return w(x);})();\n;return Component;","frontmatter":{"slug":"pass-querystring-lambda","date":"2022-12-13T00:00:00.000Z","title":"How to pass API Gateway query parameters to AWS Lambda?","tags":["AWS","Serverless","Lambda"],"summary":"Learn how to pass API Gateway query parameters to AWS Lambda","authors":["tlakomy"],"fileName":"pass-querystring-lambda.mdx"}},"authors":[{"name":"Tomasz Łakomy","avatar":"/assets/blog/authors/tomasz.jpeg","twitter":"https://twitter.com/tlakomy","slug":["tlakomy"],"fileName":"tlakomy.md","date":null}],"prev":{"fileName":"what-is-cloudformation.mdx","slug":"what-is-cloudformation","date":"2022-12-12T00:00:00.000Z","title":"What is AWS CloudFormation and why should you use it?","tags":["AWS","CloudFormation"],"summary":"Learn what AWS CloudFormation is and how it can help you to automate your infrastructure.","authors":["cloudash"]},"next":{"fileName":"difference-between-sqs-and-sns.mdx","slug":"difference-between-sqs-and-sns","date":"2022-12-13T00:00:00.000Z","title":"What's the difference between AWS SQS and SNS?","tags":["AWS","Serverless","Lambda"],"summary":"In this post, we'll explore the differences between AWS SQS (Simple Queue Service) and SNS (Simple Notifications Service).","authors":["cloudash"]}},"__N_SSG":true}