I’m getting a “Your authorization token has expire...
# aws
f
I’m getting a “Your authorization token has expired” message when pulumi attempts to push an image to ecr, anyone else see this? Happens both on my laptop and in google actions. Sampling of messages from the log:
Copy code
I0414 08:41:28.471215    5148 log.go:69] computeDefaultProviderPlugins(): summary of default plugins:
I0414 08:41:28.471219    5148 log.go:75]   command         = 0.7.1
I0414 08:41:28.471221    5148 log.go:75]   awsx            = 1.0.2
I0414 08:41:28.471222    5148 log.go:75]   docker          = 4.1.2
I0414 08:41:28.471224    5148 log.go:75]   aws             = 5.35.0
I0414 08:41:36.755674    5148 log.go:75] Explicitly ignoring and discarding error: no git repository found from /Users/[...]
I0414 08:41:37.246940    5148 log.go:75] newUpdateSource(): failed to install missing plugins: could not get latest version for plugin pulumi: 404 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-pulumi/releases/latest>. If this is a private GitHub repository, try providing a token via the GITHUB_TOKEN environment variable. See: <https://github.com/settings/tokens>
I0414 08:41:50.086882    5148 log.go:75] eventSink::Info(<{%reset%}>Pushing Image to the registry<{%reset%}>)
I0414 08:41:50.195317    5148 log.go:75] eventSink::Info(<{%reset%}>The push refers to repository [....<http://dkr.ecr.us-east-2.amazonaws.com/...|dkr.ecr.us-east-2.amazonaws.com/...>]<{%reset%}>)
I0414 08:41:50.912196    5148 log.go:75] provider received rpc error `Unknown`: `denied: Your authorization token has expired. Reauthenticate and try again.`
I0414 08:41:50.912203    5148 log.go:75] rpc error kind `Unknown` may not be recoverable
I0414 08:41:50.912265    5148 log.go:75] eventSink::Error(<{%reset%}>denied: Your authorization token has expired. Reauthenticate and try again.<{%reset%}>)
I0414 08:41:51.056814    5148 log.go:75] StepExecutor worker(19): step update on urn:pulumi:dev::[...]::docker:index/image:Image::[...] failed with an error: denied: Your authorization token has expired. Reauthenticate and try again.
Excerpt from my program
if I run pulumi on my laptop, it builds the image successfully and I can manually run
docker push
to send the image to ecr
s
Your local.Command password is out of date. It probably only ran once, the first time you created the program. But you should set it up to run/refresh every time you need to push an image since the token doesn’t last very long
f
😲
thanks Mike, I wasn’t aware of that detail
What would be the standard way to effect that run/refresh? The docs at https://www.pulumi.com/registry/packages/command/api-docs/local/command/ mention a
trigger
attribute but it’s not clear how I would link it to pushing an image
It seems I can just set
triggers: [Date.now()]
🤷‍♂️
s
yup!