Konubinix' opinionated web of thoughts

AWS

Fleeting

awscli

create access key

aws iam list-users aws iam create-access-key –user-name myusername

EKS

nodegroup

ECR

docker registry

get token to login

aws ecr get-login-password

And to find out when it expires

date
date -d@$(aws ecr get-login-password|base64 -d|jq .expiration)
Thu Aug  8 23:45:55 CEST 2024

We can conclude it is valid for 12 hours

with earthly

earthly -i –push –secret token="$(aws ecr get-login-password)" something

with helm

clk k8s registry-login –docker-login –helm-login aws

with kubernetes

To find whether the installed token for some registry has expired

date -d@$(k get secrets --output json aws-registry |jq -r '.data.".dockerconfigjson"'|base64 -d|jq -r ".auths.\"${registry}\".password"|base64 -d|jq .expiration)
Thu Aug  8 23:45:55 CEST 2024

Notes linking here