title: How to pass a querystring value from AWS API Gateway to a Lambda C# function
body: <p>I have a C# method which I have successfully published as an AWS Lambda function. It looks like this:</p>
  
  <pre><code>public class MyClass
  {
      public async Task&lt;APIGatewayProxyResponse&gt; Test(APIGatewayProxyRequest request, ILambdaContext context)
      {
          return new APIGatewayProxyResponse
          {
              Body = "Body: " + request.Body
                     + Environment.NewLine
                     + "Querystring: " + (request.QueryStringParameters == null ? "null" : string.Join(",", request.QueryStringParameters.Keys)),
              StatusCode = 200
          };
      }
  }
  </code></pre>
  
  <p>I have done the following to configure my API Gateway via the web interface:</p>
  
  <ol>
  <li>Created a new API</li>
  <li>Created a new Resource with name "myclass" and path "/myclass"</li>
  <li>Created a new GET Method for the resource, using "Lambda Function" as the integration type, and pointing at my Lambda function.</li>
  </ol>
  
  <p>I want to be able to call my Lambda function like this (without passing any specified headers in the request):
  <a href="https://xxx.execute-api.us-east-2.amazonaws.com/prod/myclass?paramA=valueA&amp;paramB=valueB" rel="nofollow noreferrer">https://xxx.execute-api.us-east-2.amazonaws.com/prod/myclass?paramA=valueA&amp;paramB=valueB</a></p>
  
  <p>I am unsure how to get my querystring parameters to pass through to the lambda function. No matter what I try, <strong>request.QueryStringParameters</strong> is always null.</p>
  
  <p>What is the correct procedure from here?</p>