title: AWS Lambda cannot connect to Parameter Store
body: <p>I have a AWS <code>Lambda</code> (java) and I try to do a test in order to retrieve a password stored on Parameter Store.
  Here is my piece of code:</p>
  
  <pre><code>GetParameterRequest parameterRequest = new GetParameterRequest();
          AWSSimpleSystemsManagement client = AWSSimpleSystemsManagementClientBuilder.defaultClient();
          parameterRequest.withName("my-password-key")
                  .setWithDecryption(true);
          GetParameterResult parameterResult = client.getParameter(parameterRequest);
          password = parameterResult.getParameter().toString();
  </code></pre>
  
  <p>The <code>security group</code> (and the <code>NACL</code>) associated with my lambda has all inbound and outbound open (any port and any IP address).</p>
  
  <p>My lambda run inside a private subnet.</p>
  
  <p>When I execute the lambda (triggered by an API Gateway event) I have the following error:</p>
  
  <pre><code>Unable to execute HTTP request: Connect to ssm.eu-central-1.amazonaws.com:443 [ssm.eu-central-1.amazonaws.com] failed: connect timed out: com.amazonaws.SdkClientException
  </code></pre>
  
  <p>Since the error is about an timeout error, I think it's not a role problem.</p>
  
  <p>I have no idea where to look.
  Any help is appreciated.</p>
  
  <p>Thanks.</p>
  
  <p>C.C.</p>