2021年4月7日星期三

How to check if AWS ECR authentication token is not expired?

I'm using AWS ECR for storing docker images. In my pipeline workflow, to push images to ECR, I need to get the authentication token to authenticate docker to AWS ECR. I do that by running the aws ecr get-login-password command. This all works well.

Now when I have to repeat this, ideally I don't want to get a new token immediately as the previous one is valid for 12 hours. How can I check if the existing token is still valid and not expired? Couldn't find any aws cli command to do this?

https://stackoverflow.com/questions/66983589/how-to-check-if-aws-ecr-authentication-token-is-not-expired April 07, 2021 at 05:49PM

没有评论:

发表评论