def get_all_certificates(**kwargs):
    """
    Use STS to fetch all of the ACM SSL certificates from a given account
    :param restrict_path: If provided, only return certificates with a matching Path value.
    """
    certificates = []
    account_number = kwargs.get("account_number")
    metrics.send(
        "get_all_acm_certificates",
        "counter",
        1,
        metric_tags={"account_number": account_number},
    )

    while True:
        response = _get_certificates(**kwargs)
        metadata = response["CertificateSummaryList"]

        for m in metadata:
            certificate = _get_certificate(
                m["CertificateArn"],
                client=kwargs["client"]
            )

            if certificate is None:
                continue

            certificate.update(
                name=m["DomainName"],
                external_id=m["CertificateArn"]
            )
            certificates.append(certificate)

        if not response.get("Marker"):
            return certificates
        else:
            kwargs.update(dict(Marker=response["Marker"]))

    Use STS to fetch all of the ACM SSL certificates from a given account
    :param restrict_path: If provided, only return certificates with a matching Path value.
    
lemur/plugins/lemur_aws/acm.py