aws-cli
aws-cli copied to clipboard
Can we have jq installed by default in aws v2 cli docker image?
Is your feature request related to a problem? Please describe. We commonly use jq to manipulate json as input or pick properties from aws command output in shell script. It will be really good if we can include jq in official docker image of v2 like what Azure cli does.
Describe the solution you'd like include jq program in aws v2 docker image
Describe alternatives you've considered We currently build our own custom image for v1 to have jq installed.
Additional context
Hi @melcloud, thank you for submitting this feature request. I'm labeling it for additional team review to discuss how to manage Docker image dependency or utility requests, as there are other requests as well (e.g., #5106).
Any update available on this?
Any news? thx
Any update on this?
This would be fantastic
Any update, it likely should not be that difficult.
Hi @melcloud et al,
Indeed it would be straightforward to include jq, as it exists in the package repository used here (adding it asyum install -y less groff jq works). However, the usage of it is not straightforward, since the default entrypoint is set to aws - adding in a piped command here doesn't work nicely. So, you would have to be overriding the default entrypoint, either by making your own image, or supplying --entrypoint /bin/bash. Is that what you're currently doing or desire to be able to do?
This image is already large (346 MB).jq adds another MB, which is not much, but could add up as other requested dependencies are added (e.g., tar from #5106). A possibility for this is to keep the existing image as a 'slim' (relatively) image and provide a separate image with more features. What do you think?
Yeap. Slim and a more feature rich would work.
I needed to exchange current AWS credentials with Assume Role. jq is very helpful for scripts like that:
aws_credentials=$(aws sts assume-role --role-arn arn:aws:iam::1234567890:role/nameOfMyrole --role-session-name "RoleSession1")
export AWS_ACCESS_KEY_ID=$(echo $aws_credentials|jq '.Credentials.AccessKeyId'|tr -d '"')
export AWS_SECRET_ACCESS_KEY=$(echo $aws_credentials|jq '.Credentials.SecretAccessKey'|tr -d '"')
export AWS_SESSION_TOKEN=$(echo $aws_credentials|jq '.Credentials.SessionToken'|tr -d '"')
Adding yum update && yum install -y jq was enough to solve that, +1 to include it by default
+1 This is essential for all aws commands out put are json based. & parsing is required.
+1
+1
Since AWS CLI doesn't provide a nice clean way to easily patch image tag in an ECS task, jq is essential.
+1
+1 JQ is absolutely needed for working with the AWS CLI beyond "trivial" examples.
+1
+1
+1
Pls help us AWS
Would be a dream to have jq included!
+1
+1
I'm very upset that it's still not included. We need to make awscli great again! by adding jq!
As even some AWS blog articles mention and recommend using JQ for STS token exchange in the scripts, it does make sense to have jq in this image eks Pod Identity Article
Viva Las Mexico
On Mon, Jun 3, 2024, 14:28 Vlad @.***> wrote:
As even some AWS blog articles mention and recommend using JQ for STS token exchange in the scripts, it does make sense to have jq in this image eks Pod Identity Article https://aws.amazon.com/blogs/containers/amazon-eks-pod-identity-a-new-way-for-applications-on-eks-to-obtain-iam-credentials/
— Reply to this email directly, view it on GitHub https://github.com/aws/aws-cli/issues/5227#issuecomment-2145958682, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4D26XJLDMNKJ5CHO3X46X3ZFS7VPAVCNFSM4NHK5UYKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJUGU4TKOBWHAZA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks for your continued interest in this feature request. The team has discussed it again and is considering creating:
- A "slim" version of the AWS CLI v2 Docker image.
- A more feature-rich version that includes utilities like
jq.
We haven't finalized this yet - we're still weighing the tradeoffs and looking at your feedback, as well as balancing the need to work on other issues.
Let us know if you have any other thoughts. We appreciate you engaging on this and will provide an update once we've made a decision.