def get_certificate()

in deployment_lambda/lambda_function.py [0:0]


def get_certificate(ca_arn, cert_arn):
    try:
        acm_pca = boto3.client('acm-pca')
        cert = acm_pca.get_certificate(CertificateAuthorityArn=ca_arn, CertificateArn=cert_arn)
        return cert['Certificate']
    except acm_pca.exceptions.RequestInProgressException:
        logger.info('certificate %s is in progress' % cert_arn)
        time.sleep(1)
        return get_certificate(ca_arn, cert_arn)