def deleteRoleAlias()

in codes/lambda/custom_iot_role_alias/src/handler.py [0:0]


def deleteRoleAlias(role_alias_name):
    print("Role deletion : requested", role_alias_name)

    try:
        client = boto3.client('iot')
        client.delete_role_alias(
            roleAlias=role_alias_name
        )
        print("Role deletion : success")
        return role_alias_name
    except Exception as e:
        print("Role deletion: ", e)
        return None