I thought I could add a tag for my AWS machines, for example
Key: backup Value: 00 04 * * *
and then from our management server use this to schedule snapshots of a volume at a specific time. So far, I am struggling with the jmespath file, and I seem to be unable to figure out the json path extraction syntax:
aws ec2 describe-instances --query 'Reservations[].Instances[].Tags[?Key==`Backup`]'
[
[],
[],
[],
[],
[
{
"Value": "00 04 * * *",
"Key": "Backup"
}
],
[],
[]
]
I could use some help to decide how to extract the following two values if the Backup tag is defined for the instance.
InstanceId, backup key value
source
share