InvalidSignatureException: Signature expired error when running "webiny deploy-api" on my macbook terminal (in the examples folder)

Following the prerequisites and local setup on the Contributions page, I have run into InvalidSignatureException: Signature expired error when running webiny deploy-ap on my macbook terminal (in the examples folder).

Is there any local setup procedures I could be missing?

Here is the Error (XXXX… to mark potential security info):

This is the first deploy of local environment, so it may take a few minutes.Here's ☕️ to make the time pass faster :)  An error occurred during deployment of files InvalidSignatureException: Signature expired: XXXXXXXXXXXX is now earlier than XXXXXXXXXXXXX (XXXXXXXXXXX - 5 min.)
at Object.extractError (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/protocol/json.js:51:27)
at Request.extractError (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8)
at Request.callListeners (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/thomasjackson/Desktop/Software projects/Open Source Projects/Webiny/webiny-js/node_modules/aws-sdk/lib/request.js:685:12) {
message: 'Signature expired: XXXXXXXXXXXXX is now earlier ' +
'than XXXXXXXXXXXX (XXXXXXXX - 5 min.)',
code: 'InvalidSignatureException',
time: 2020-05-16T00:40:51.370Z,
statusCode: 403,
retryable: true

I am not reporting this as a bug as I may have made a mistake in my setup or the setup guide wasn’t clear.

I set up an IAM User on AWS
my second IAM on my AWS account but when running cat credentials (from the end of this video). I get default aws values appearing:


I didn’t continue to the next video as I thought it was just the one video I had to follow.

I changed my MongoDB IP to on MongoDB Atlas

My env.json variables appear as

  "default": {
    "AWS_PROFILE": "default",
    "AWS_REGION": "us-east-1",
    "MONGODB_SERVER": "mongodb+srv:/[NAME]:[PASSWORD]@c[CLUSTER]",
    "MONGODB_NAME": "webiny-dev",
    "DEBUG": true

As one set of credentials was appearing in my Terminal I kept AWS PROFILE as default
I removed /test?retryWrites=true&w=majority from the suggested URL from MongoDB Atlas to keep in line with your suggested url, but I didn’t create the “webiny-dev” database in the cluster as I thought it might be automatically created.

I am based in Ireland but I kept AWS REGION the same.

I followed all steps from local setup until webiny deploy-ap where it failed.

Any suggestions would be great. Maybe the documentation needs more clarification on somethings for an easier setup.

p.s. I originally posted this as issue 838 in the GitHub repository but as nobody helped me there I thought the Webiny community site would be better for these types of issues.

Hey @tj85, sorry for not responding. We are super busy with wrapping up the upcoming beta release, your issue might’ve slipped our attention. We can continue the conversation here, once we’re done, I’ll close the GH issue you’ve created.

So, regarding your issue…

This is an AWS-related issue I’d say.

First of all, can you check your system clock is correct?

This user had the same issue for example -

Let us know when if that helped.

Thank you!

Thats ok. I am checking the system clock on my Macbook.
Do you think it could be related to the fact I am using ‘us-east-1’ AWS_REGION when my system clock is set to Ireland / UK time?
If it is, should it be ok to run the application from the ‘eu-west-1’ AWS_REGION instead?
I pick up ResourceNotFoundException: User pool us-east-1_M0YxcZEuP does not exist error when trying to run eu-west-1 instead.
Great work on the application! I am looking forward to trying to contribute to it.

It doesn’t matter to which region you’re deploying. We’ve been testing deployments in a couple of regions, didn’t have any similar issues so far.

Can you try creating and deploying a brand new project to, let’s say, eu-central-1 (I’m using that one all the time) ? Does that work?

Please let me know when you get a chance. Hopefully we’ll get this sorted out soon, so you can check the project out in its entirety. :slight_smile:


Just so you know, I’m not trying to create projects by installing webiny-js, I am trying to create a local development environment to contribute to the project.

I forked the webiny-js repository and cloned it into a local repository.

So I just made a new pull request from webiny-js’s master branch to keep it updated. Is that enough to restart it?

I will create a new IAM user account though.

Yeah, I understood that you’re trying to get up and running via the webiny-js repo, not as a regular user.

So yeah, just clone it from scratch, and please try to do a new deployment.

Correct me if I’m wrong, but I believe that you’ve just changed the AWS region in your .env file, and tried to do the redeploy. This won’t work, because, .serverless folder already contains the state of all deployed resources (deployed to the region you previously had set), and doing a deploy to another region will result in an error. I’m basing this assumption on the error you shared above - ResourceNotFoundException: User pool us-east-1_M0YxcZEuP does not exist.

Anyways, in order to be super sure, let’s try doing a complete clone and redeploy, into eu-central-1.

Let me know if you have any more questions or you need help!

Thanks a lot!

Oh and I almost forgot.

We’ll be merging some major code changes into the master branch in a couple of days, and basically, the new code won’t be even close to what is there now.

So, for any “more-serious” development, you should wait for us to merge it. But still, if you want to explore the system a bit until we do it, that’s fine too.

I can let you know once it’s up if you want.

Ok thats good to hear. I wont start doing any PR’s until its done. Is there anypoint in me setting up the repo so? Will I have to create a new repository again or can I simply just pull the changes and have it run like normal?

Unfortunately, you will have to clone the repo again and create a new deployment, as the deployment mechanisms and the project structure have vastly changed.

Ok, in that case I am just going to abandon this for the time being. It was a good start anyway.

I’ll let you know here once it’s up. Among other improvements, we are also beta-releasing our new Headless CMS app.

Hopefully you’ll be able to continue soon.

1 Like

Thanks! Please keep me informed!

Is it better to start contibuting now?

1 Like

@tj85 so sorry we forgot about this thread. Yes, now is absolutely the best time to join the project. Feel free to join us on community slack to communicate with the team, and see you on Github :slight_smile:

1 Like