我正在使用 python 将 openssl 证书导入 AWS ACM。我总是得到一个错误:
Response:
{
"errorMessage": "An error occurred (ValidationException) when calling the ImportCertificate operation: The certificate field contains more than one certificate. You can specify only one certificate in this field.",
"errorType": "ClientError",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 7, in lambda_handler\n response = client.import_certificate(\n",
" File \"/var/runtime/botocore/client.py\", line 316, in _api_call\n return self._make_api_call(operation_name, kwargs)\n",
" File \"/var/runtime/botocore/client.py\", line 626, in _make_api_call\n raise error_class(parsed_response, operation_name)\n"
]
}
这是我的代码:
import boto3
client = boto3.client('acm')
def lambda_handler(event, context):
response = client.import_certificate(
Certificate='sample.vpn.crt',
PrivateKey='sample.vpn.key',
CertificateChain='ca.crt'
)
任何帮助,将不胜感激。