Trying to filter out only repos that start with name but always got empty collection back. I can see the values there when running without the starts_with option
aws ecr describe-repositories --query "repositories[?starts_with(repositoryName, 'test') == 'true'].repositoryName"
You need to use Backticks for pattern matching.
aws ecr describe-repositories --query 'repositories[?starts_with(repositoryName, `stage`) == `true`]'
or If you want just ARN or NAME then you can use
aws ecr describe-repositories --query 'repositories[?starts_with(repositoryName, `stage`) == `true`]|[].[repositoryName,repositoryUri]'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With