copilot init application name results in invalid signature exception

Application name: newapp ✘ get application newapp: get application newapp: InvalidSignatureException: Signature expired: 20200709T065347Z is now earlier than 20200710T074923Z (20200710T075423Z - 5 min.) status code: 400, request id: 440a54c2-6e08-4a7b-b50a-0d8d698b6679
I received the above error directly after submitting the application name during copilot init. Note that I am running this on the Linux subsystem on Win10 (WSL2). I do notice the date-time check check is checking against a signature that is a day older then the current day (July 10 vs July 9). Is there a way to update the signature date-time?
Hi @jrothman !
This is very interesting, I found this thread on the AWS SDK: https://github.com/aws/aws-sdk-js/issues/527 where people recommend:
Running a sync between the VM and the host cleared it up.
(https://github.com/aws/aws-sdk-js/issues/527#issuecomment-111512719) or
I encountered this issue locally, and restarting my docker daemon fixed it.
https://github.com/aws/aws-sdk-js/issues/527#issuecomment-238637510
Would you mind giving those a shot to see if it fixes your issue?
Brilliant - exactly the issue: docker containers were out of sync with the host.
I ran this and it fixed the issue:
docker run --rm --privileged alpine hwclock -s
copilot looks great!
I'm not on a VM and have restarted the local DockerDesktop.app (restarted laptop too)
Still no luck... 🤯
docker.app had an update, that didn't fix it:
> $ copilot init \ ⬡ 18.12.1
-a portaldashboard \
-t "Load Balanced Web Service" -n django-dashboard-web \
-d ./compose/production/django/Dockerfile
Note: It's best to run this command in the root of your Git repository.
Welcome to the Copilot CLI! We're going to walk you through some questions
to help you get set up with a containerized application on AWS. An application is a collection of
containerized services that operate together.
✘ get application portaldashboard: get application portaldashboard: InvalidSignatureException: Credential should be scoped to a valid region.
status code: 400, request id: 48169f83-6e33-4423-9891-5eba30f45499
I was so happy when I found copilot. 😄😕
What did solve the error for me (or maybe it's just a workaround), I did debug code and jumped into a method
/.../botocore/client.py:_create_api_method(...) and I noticed what there're 2 parameters passed to it, one of which is 'us-west-2' and I just changed the region to that value (with os.environ['AWS_DEFAULT_REGION'] = 'us-west-2')