title: Cannot import cfnresponse AWS lambda
body: <p>I'm facing the issue with error while executing aws lambda function which is 'Unable to import module 'custom_resource_lambda': No module named cfnresponse'. I saw the one case but solution was to change runtime python version to 2.7, but it does not work for me. Please give me know what I am doing wrong. Cheers</p>
  <pre><code>import json
  import boto3
  import cfnresponse
  from common_helpers.constants_v2 import LOGGER_NAME
  import os
  import logging
  
  
  
  DEBUG_MODE = os.getenv('DEBUG_MODE', 'false')
  ENV_NAME = os.getenv('COMPUTE_ENVIRONMENT_NAME')
  
  batch_client = boto3.client('batch')
  
  # Configure logging
  LOGGER = logging.getLogger(LOGGER_NAME)
  if DEBUG_MODE == 'true':
      LOGGER.setLevel(logging.DEBUG)
  else:
      LOGGER.setLevel(logging.INFO)
  
  
  def handler(event, context):
      LOGGER.info(&quot;Received event: &quot; + json.dumps(event))
      try:
          if event['RequestType'] == 'Delete':
              send(event, context, cfnresponse.SUCCESS)
              return
          response = batch_client.describe_compute_environments(
              computeEnvironments=[
                  ENV_NAME,
              ],
          )
          compute_env_details = response.get('computeEnvironments')
          cluster_arn = compute_env_details[0]['ecsClusterArn']
          cluster_name = cluster_arn.split('/')[1]
          data = dict(Data=dict(
              ClusterArn=cluster_arn,
              ClusterName=cluster_name))
          event.update(data)
          cfnresponse.send(event, context, cfnresponse.SUCCESS)
      except BaseException as e:
          send(event, context, cfnresponse.FAILED)
  </code></pre>