def create_deployment()

in deploy_component_version.py [0:0]


def create_deployment(name, components):
    """ Creates a deployment of the component to the given Greengrass core device """
    thing_arn = 'arn:aws:iot:{}:{}:thing/{}'.format(gdk_config.region(), ACCOUNT, args.coreDeviceThingName)

    try:
        response = greengrassv2_client.create_deployment(
            targetArn=thing_arn,
            deploymentName=name,
            components=components
        )
    except Exception as e:
        print('Failed to create deployment\nException: {}'.format(e))
        sys.exit(1)

    return response['deploymentId']