code: def get_api_id(self, lambda_name):
          
          try:
              response = self.cf_client.describe_stack_resource(StackName=lambda_name,
                                                                LogicalResourceId='Api')
              return response['StackResourceDetail'].get('PhysicalResourceId', None)
          except: # pragma: no cover
              try:
                  # Try the old method (project was probably made on an older, non CF version)
                  response = self.apigateway_client.get_rest_apis(limit=500)
  
                  for item in response['items']:
                      if item['name'] == lambda_name:
                          return item['id']
  
                  logger.exception('Could not get API ID.')
                  return None
              except: # pragma: no cover
                  # We don't even have an API deployed. That's okay!
                  return None
docs: Given a lambda_name, return the API id.