Skip to content

Commit

Permalink
🐛Autoscaling: SSM client key error fix (#6299)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg authored Sep 3, 2024
1 parent a33fee8 commit cc3df87
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/aws-library/src/aws_library/ssm/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,16 @@ async def get_command(self, instance_id: str, *, command_id: str) -> SSMCommand:
instance_ids=[response["InstanceId"]],
status=response["Status"] if response["Status"] != "Delayed" else "Pending",
message=response["StatusDetails"],
start_time=arrow.get(response["ExecutionStartDateTime"]).datetime,
finish_time=arrow.get(response["ExecutionEndDateTime"]).datetime,
start_time=(
arrow.get(response["ExecutionStartDateTime"]).datetime
if response.get("ExecutionStartDateTime")
else None
),
finish_time=(
arrow.get(response["ExecutionEndDateTime"]).datetime
if response.get("ExecutionEndDateTime")
else None
),
)

@log_decorator(_logger, logging.DEBUG)
Expand Down

0 comments on commit cc3df87

Please sign in to comment.