Skip to content

Commit cc3df87

Browse files
authored
šŸ›Autoscaling: SSM client key error fix (#6299)
1 parent a33fee8 commit cc3df87

File tree

1 file changed

+10
-2
lines changed
  • packages/aws-library/src/aws_library/ssm

1 file changed

+10
-2
lines changed

ā€Žpackages/aws-library/src/aws_library/ssm/_client.pyā€Ž

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,16 @@ async def get_command(self, instance_id: str, *, command_id: str) -> SSMCommand:
118118
instance_ids=[response["InstanceId"]],
119119
status=response["Status"] if response["Status"] != "Delayed" else "Pending",
120120
message=response["StatusDetails"],
121-
start_time=arrow.get(response["ExecutionStartDateTime"]).datetime,
122-
finish_time=arrow.get(response["ExecutionEndDateTime"]).datetime,
121+
start_time=(
122+
arrow.get(response["ExecutionStartDateTime"]).datetime
123+
if response.get("ExecutionStartDateTime")
124+
else None
125+
),
126+
finish_time=(
127+
arrow.get(response["ExecutionEndDateTime"]).datetime
128+
if response.get("ExecutionEndDateTime")
129+
else None
130+
),
123131
)
124132

125133
@log_decorator(_logger, logging.DEBUG)

0 commit comments

Comments
Ā (0)