-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws iot describe-ca-certificate not able to display expiration date for ca certificate #2927
Comments
Same problem is also present in |
Hi @vesajaaskelainen - thanks for reaching out. I've attempted a couple times to reproduce this but was unable to. Then I continue to look into the |
Please set you time zone somewhere that is positive like +02:00 then the python's time sanity checker goes haywire. I installed awscliv2 with as instructed but with that you cannot debug it as you encapsulate the libraries. The problem description command was executed with the pristine release installed with installation instructions. Only way to debug the problem was to install the components in python's virtual environment. Here is example session when playing out with time zone from command line (with release aws cli): $ aws --version
aws-cli/2.11.16 Python/3.11.3 Linux/5.19.0-41-generic exe/x86_64.ubuntu.22 prompt/off
$ aws iot describe-ca-certificate --profile my-profile --certificate-id xxxxxx
date value out of range
$ TZ='America/New_York' aws iot describe-ca-certificate --profile my-profile --certificate-id xxxxxx
{
"certificateDescription": {....
}
}
$ TZ='Europe/Helsinki' aws iot describe-ca-certificate --profile my-profile --certificate-id xxxxxx
date value out of range
|
Describe the bug
I registered IEEE Secure Device Identity based CA certificate in the AWS IoT Core.
In AWS IoT Console Web UI it is shown OKish.
Now I try to see certificate details from CLI:
$ aws --version aws-cli/2.11.16 Python/3.11.3 Linux/5.19.0-40-generic exe/x86_64.ubuntu.22 prompt/off $ aws iot describe-ca-certificate --profile my-profile --certificate-id $CA_CERTIFICATE_ID date value out of range
My current time zone is
Europe/Helsinki
(GMT+02:00)Expected Behavior
Command
aws iot describe-ca-certificate
would display details correctly.Current Behavior
Same command with additional
--debug
:Reproduction Steps
Invoke AWS CLI method:
in example with the following scripts:
$ aws iot describe-ca-certificate --profile my-profile --certificate-id $CA_CERTIFICATE_ID
Alternatively just invoke the
parse_timestamp
function with2.53402300799E11
:Possible Solution
Treat the time as UTC always:
and then trying it out:
To get consistent output I would probably just always use tzutc() for parsing the date time and if for some reason this does not work then use local timezone.
Testing the change:
Personally I would prefer to have timestamp in ISO format eg.
9999-12-31T23:59:59Z
but also that+00:00
form is understandable.Additional Information/Context
No response
SDK version used
1.29.123
Environment details (OS name and version, etc.)
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: