setup/lambda-custom-resource/prepare_dev_package_cr.py [18:43]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http = urllib3.PoolManager()

LOGGER = logging.getLogger()
LOGGER.setLevel(logging.INFO)

BUCKET_NAME = os.environ['BUCKET_NAME']
PROJECT_NAME = os.environ['PROJECT_NAME']
AWS_REGION = os.environ['AWS_REGION']

LOCAL_DIR_PREFIX = '/tmp/'  # Needed for running in AWS Lambda

iot_client = boto3.client('iot')
sm_client = boto3.client('sagemaker')
s3_client = boto3.client('s3')

# Global variables
# This information needs to match with what was defined in the CloudFormation template
sm_edge_device_name = 'edge-device-defect-detection-%s' % PROJECT_NAME
iot_policy_name = 'defect-detection-policy-%s' % PROJECT_NAME
iot_thing_name = 'edge-device-%s' % PROJECT_NAME
iot_thing_group_name='defect-detection-%s-group' % PROJECT_NAME
sm_em_fleet_name = 'defect-detection-%s' % PROJECT_NAME
role_alias = 'SageMakerEdge-%s' % sm_em_fleet_name


def cfn_cleanup():
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



setup/template.yaml [215:240]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          http = urllib3.PoolManager()

          LOGGER = logging.getLogger()
          LOGGER.setLevel(logging.INFO)

          BUCKET_NAME = os.environ['BUCKET_NAME']
          PROJECT_NAME = os.environ['PROJECT_NAME']
          AWS_REGION = os.environ['AWS_REGION']

          LOCAL_DIR_PREFIX = '/tmp/'  # Needed for running in AWS Lambda

          iot_client = boto3.client('iot')
          sm_client = boto3.client('sagemaker')
          s3_client = boto3.client('s3')

          # Global variables
          # This information needs to match with what was defined in the CloudFormation template
          sm_edge_device_name = 'edge-device-defect-detection-%s' % PROJECT_NAME
          iot_policy_name = 'defect-detection-policy-%s' % PROJECT_NAME
          iot_thing_name = 'edge-device-%s' % PROJECT_NAME
          iot_thing_group_name='defect-detection-%s-group' % PROJECT_NAME
          sm_em_fleet_name = 'defect-detection-%s' % PROJECT_NAME
          role_alias = 'SageMakerEdge-%s' % sm_em_fleet_name


          def cfn_cleanup():
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



