Problem deploying files


This is a first time for me to try Webiny and I have some issue with deploying files.
Here’s from console:

 An error occurred during deployment of files
{ AccessDenied: Access Denied
    at Request.extractError (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/services/s3.js:835:35)
    at Request.callListeners (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/xxx/Sites/test/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/xxx/Sites/test/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
  message: 'Access Denied',
  code: 'AccessDenied',
  region: null,
  time: 2020-04-16T08:37:28.402Z,
  requestId: '2B541A64ACE51780',
  cfId: undefined,
  statusCode: 403,
  retryable: false,
  retryDelay: 31.11735750342508 }

AWS credentials are configured on my system and user have AdministratorAccess.

Any idea what could be the problem?

Hi @mixerowsky,

yeah, this really looks like you’re missing some permissions.

Are you sure the user you’re using to deploy Webiny has the mentioned AdministratorAccess policy? Can you just double check?

I really can’t see any other alternatives here :confused:

Anybody from the team maybe has any ideas?

Hey @Adrian_Smijulj,

I checked that already, now again, the user have AdministratorAccess.

Here’s screenshot:

I will setup a brand new project, just to double check this isn’t a global issue.

BTW which region are you deploying to?


It’s us-east-1 region

Just wanted to let you know that I’ve successfully deployed the project two times, both to us-east-1.

Can you check if the user that’s used on your system is actually the one you’ve defined in the AWS?

Please run aws sts get-caller-identity, does it give you the correct response?

Thank you!

P.S.: from the docs:

NOTE: if you’re unsure your AWS credentials are configured correctly, you can verify them by running the following command using AWS CLI: aws sts get-caller-identity . If you don’t see the user info, take a look at this tutorial to create an IAM user for programmatic usage.

Thanks @Adrian_Smijulj, I still have the same issue, and aws sts get-caller-identity gives me exact user I’m created, so that’s fine.

@mixerowsky let’s try a little experiment here: go to your api/.env.json and modify the bucket name: "S3_BUCKET": "enter-a unique-whatever-you-want-string-here". Then redeploy.

This error is something we had a few weeks ago, however it was resolved on its own, without us doing a single thing. Something was wrong with AWS I guess…

Let us know how it goes!

@pavel I tried to change it few times and redeploy, result is the same, 403.

Yeah just as I expected. That unfortunately has something to do with AWS - again :frowning: We really don’t do anything special there, we just create a bucket if it does’t exist using your AWS credentials. No magic there…

I’ll try creating a blank project myself and see if it errors on me as well.

EDIT: just remembered that it’s not the bucket that is throwing the error, it’s the bucket acceleration that we try to enable that throws.

Every single bucket is created on AWS, but all are empty.

Yes it’s the acceleration enabling that fails (see my edit above). We’ll make this optional and release a fix later today. We’ll notify you when it’s ready to update the packages.

Started working on this @mixerowsky.

Hi @mixerowsky,

I just released a couple of things to NPM.

Most importantly, you can now disable the acceleration when deploying Webiny.

First of all, run yarn upgrade --scope @webiny, in order to upgrade all @webiny/* packages.

Then, open your api/serverless.yml file, and in the files.inputs, add the storage section, with the accelerated flag set to false.

      accelerated: false

Please give it a try when you get a chance, and let us know if that helped.

Thanks a lot for your time and patience! :beers: :beers:

1 Like

This fixed it for me, thanks a lot, been a couple of days struggling with this issue.

1 Like

That’s awesome to hear! :slight_smile:

Hey @Adrian_Smijulj, it’s working now, thanks a lot! :beers:

Very nice! :tada: :tada: :tada: