What controls the format of createdAt in the ECS event log from aws ecs describe-services?

Viewed 61

I’m having problems writing a reliable parser for the output from aws ecs describe-services after switching shells to zsh (my scripts run with bash).

The createdAt field of services.events will return differently if the process is launched from a login shell compared to a non-login shell but I don’t understand what it is in the environment that controls the output format. Does anyone know?

With "bash -l"

aws ecs describe-services --cluster $ECS_CLUSTER_NAME --service $ECS_SERVICE_NAME | jq '.services[0].events[0]' 
{
  "id": "885a572b-f7c9-491b-a16b-8e567179d28a",
  "createdAt": 1597390197.826,
  "message": "(service refapp-ecs-service) has reached a steady state."
}

With bash (started from zsh):

aws ecs describe-services --cluster $ECS_CLUSTER_NAME --service $ECS_SERVICE_NAME | jq '.services[0].events[0]' 
{
  "id": "885a572b-f7c9-491b-a16b-8e567179d28a",
  "createdAt": "2020-08-14T09:29:57.826000+02:00",
  "message": "(service refapp-ecs-service) has reached a steady state."
}

Both environments have

LANG=en_US.UTF-8
0 Answers
Related