I am calling the visa API from amazon glue which is in the cloud and I am putting the certfile in the s3 bucket.The code that I am using to call the visa API is as follows
key_content = s3.get_object(Bucket=S3_BUCKET, Key=object_key)['Body'].read()
key_cert = tempfile.NamedTemporaryFile(suffix='.p12')
key_cert.write(key_content)
response = post(url,
# verify = ('put the CA certificate pem file path here'),
headers = headers,
auth=(user_id, password),
data = payload,
pkcs12_filename=key_cert.name,
pkcs12_password='********',
)
Howver I am getting the error ."Could not deserialize PKCS12 data"
Please let me know how to fix this.Any help is appreciated.
Hi @rlandge, Thank you for reaching out. An agent is looking into this and will get back to you as soon as possible. If any community member has a possible solution, please feel free to share it here.
Hi @rlandge,
Please provide the following information so I can investigate the error.
You can find the x-correlation-id in the response header.
Hi @API_Products ,
This error comes prior to making the visa API call.If you have come across any other solution to make.a visa api call through Amazon Glue (like setting up the certs and keys in S3 and reading from there) through python code it would be helpful.
Hi Diana,
We are using the VOP Merchant Search/Merchant Locator API to get locations data and we need to do this from Amazon Glue and need help of setting up certificates and importing certificates/keys in keystore (as per the code posted above) from glue.
Thanks
Hi @rlandge,
Please provide the x-correlation-id (located in the Response Header) so we can investigate the error.
Hi @rlandge,
Are you still experiencing an error? If so, please provide the following information for further investigation.
You can find the x-correlation-id in the response header.
Hi @rlandge,
I haven't heard from you so I'll take you off my contact list. Please reach out to us at the community if you need any help.