src/integ_test_resources/ios/sdk/integration/cdk/custom_resources/iot_custom_authorizer_provider/iot_custom_authorizer_provider.py [35:63]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    custom_authorizer_name = event["ResourceProperties"]["authorizer_name"]
    delete_authorizer(custom_authorizer_name)
    response = {"PhysicalResourceId": physical_id}
    print(f"### on_delete response: {response}")
    return response


def create_authorizer(name, function_arn, public_key, token_key_name):
    print(f"### create_authorizer({name, function_arn, public_key, token_key_name})")
    client = boto3.client("iot")
    formatted_key = format_public_key(public_key)
    create_authorizer_response = client.create_authorizer(
        authorizerName=name,
        authorizerFunctionArn=function_arn,
        tokenKeyName=token_key_name,
        status="ACTIVE",
        signingDisabled=False,
        tokenSigningPublicKeys={"public_key": formatted_key},
    )
    print(f"### create_authorizer_response: {create_authorizer_response}")


def format_public_key(public_key):
    return f"-----BEGIN PUBLIC KEY-----\n{public_key}\n-----END PUBLIC KEY-----"


def delete_authorizer(name):
    print(f"### delete_authorizer({name})")
    client = boto3.client("iot")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/integ_test_resources/ios/sdk/integration/cdk/custom_resources/iot_custom_authorizer_user_pass_provider/iot_custom_authorizer_user_pass_provider.py [75:103]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    custom_authorizer_name = event["ResourceProperties"]["authorizer_name"]
    delete_authorizer(custom_authorizer_name)
    response = {"PhysicalResourceId": physical_id}
    print(f"### on_delete response: {response}")
    return response


def create_authorizer(name, function_arn, public_key, token_key_name):
    print(f"### create_authorizer({name, function_arn, public_key, token_key_name})")
    client = boto3.client("iot")
    formatted_key = format_public_key(public_key)
    create_authorizer_response = client.create_authorizer(
        authorizerName=name,
        authorizerFunctionArn=function_arn,
        tokenKeyName=token_key_name,
        status="ACTIVE",
        signingDisabled=False,
        tokenSigningPublicKeys={"public_key": formatted_key},
    )
    print(f"### create_authorizer_response: {create_authorizer_response}")


def format_public_key(public_key):
    return f"-----BEGIN PUBLIC KEY-----\n{public_key}\n-----END PUBLIC KEY-----"


def delete_authorizer(name):
    print(f"### delete_authorizer({name})")
    client = boto3.client("iot")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



