title: Deploy multiple lambdas in one serverless application model
body: <p>I would like to use a serverless application model (sam.yml) file to deploy two AWS lambda functions with api gateway integration. My file looks like this: </p>
  
  <pre><code>AWSTemplateFormatVersion: '2010-09-09'
  Transform: AWS::Serverless-2016-10-31
  Description: "Client Service"
  Resources:
    PetStoreServerFunction:
      Type: AWS::Serverless::Function
      Properties:
        Handler: server.LambdaHandler::handleRequest
        Runtime: java8
        CodeUri: petstore-server/target/petstore-server-1.0-SNAPSHOT.jar
        MemorySize: 512
        Policies:
          - AWSLambdaBasicExecutionRole
        Timeout: 20
        Events:
          GetResource:
            Type: Api
            Properties:
              Path: /server/{proxy+}
              Method: any
    PetStoreClientFunction:
      Type: AWS::Serverless::Function
      Properties:
        Handler: client.LambdaHandler::handleRequest
        Runtime: java8
        CodeUri: petstore-client/target/petstore-client-1.0-SNAPSHOT.jar
        MemorySize: 512
        Policies:
          - AWSLambdaBasicExecutionRole
        Timeout: 20
        Events:
          GetResource:
            Type: Api
            Properties:
              Path: /client/{proxy+}
              Method: any
  </code></pre>
  
  <p>Within the lambda web console, I can see both functions created, yet I can only call one of them via the API Gateway. For the other I get <code>{"message":"Gateway timeout"}</code>.</p>
  
  <p>Any ideas? What is the best way to describe two function deployments within a single serverless application model?</p>
  
  <p>I have seen this example: <a href="https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/api_backend/template.yaml" rel="nofollow noreferrer">https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/api_backend/template.yaml</a></p>
  
  <p>Yet this creates two lambda functions from the <em>same</em> source code. This is not what I am trying to achieve. I would like to create two lambda functions from <em>different</em> deployments within a <em>single</em> sam.yml file.</p>