question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not locate deployment bucket. Error: Access Denied

See original GitHub issue

Bug Report

Description

  1. What did you do? I created a Serverless project and when I try to deploy it, I get the error: “Could not locate deployment bucket. Error: Access Denied”

  2. What happened? I get the error “Could not locate deployment bucket. Error: Access Denied”

  3. What should’ve happened? It should have deployed correctly and should have access to the bucket. I’m using the credentials of an account with Administrator access.

  4. What’s the content of your serverless.yml file? `service: fel360-api

provider: name: aws runtime: nodejs12.x stage: v1 region: us-west-2 memorySize: 128 deploymentBucket: name: fel360-lambdas iamRoleStatements: - Effect: ‘Allow’ Action: - ‘lambda:InvokeFunction’ - ‘ses:SendTemplatedEmail’ - ‘ses:SendRawEmail’ - ‘s3:GetObject’ - ‘s3:GetObjectAcl’ - ‘s3:PutObject’ - ‘s3:PutObjectAcl’ - ‘s3:DeleteObject’ - ‘s3:ListBucket’ Resource: - ‘*’

package: excludeDevDependencies: false individually: true exclude: - ‘*/**’

functions: ${file(./serverless-config/functions.yml)}`

  1. What’s the output you get when you use the SLS_DEBUG=* environment variable (e.g. SLS_DEBUG=* serverless deploy) `Serverless: Load command interactiveCli Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command create Serverless: Load command install Serverless: Load command package Serverless: Load command deploy Serverless: Load command deploy:function Serverless: Load command deploy:list Serverless: Load command deploy:list:functions Serverless: Load command invoke Serverless: Load command invoke:local Serverless: Load command info Serverless: Load command logs Serverless: Load command metrics Serverless: Load command print Serverless: Load command remove Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command slstats Serverless: Load command plugin Serverless: Load command plugin Serverless: Load command plugin:install Serverless: Load command plugin Serverless: Load command plugin:uninstall Serverless: Load command plugin Serverless: Load command plugin:list Serverless: Load command plugin Serverless: Load command plugin:search Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command upgrade Serverless: Load command uninstall Serverless: Load command login Serverless: Load command logout Serverless: Load command generate-event Serverless: Load command test Serverless: Load command dashboard Serverless: Invoke deploy Serverless: Invoke package Serverless: Invoke aws:common:validate Serverless: Invoke aws:common:cleanupTempDir Serverless: Packaging service… Serverless: Invoke aws📦finalize Serverless: Invoke aws:common:moveArtifactsToPackage Serverless: Invoke aws:common:validate Serverless: [AWS s3 403 0.579s 0 retries] getBucketLocation({ Bucket: ‘fel360-lambdas’ })

Serverless Error ---------------------------------------

ServerlessError: Could not locate deployment bucket. Error: Access Denied at BbPromise.resolve.then.then.catch.err (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\lib\existsDeploymentBucket.js:25:15) From previous event: at AwsDeploy.existsDeploymentBucket (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\lib\existsDeploymentBucket.js:24:13) at AwsDeploy.BbPromise.bind.then.then (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\index.js:73:27) From previous event: at Object.before:deploy:deploy [as hook] (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\index.js:70:12) at BbPromise.reduce (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:490:55) From previous event: at PluginManager.invoke (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:490:22) at getHooks.reduce.then (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:525:24) From previous event: at PluginManager.run (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:525:8) at variables.populateService.then (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\Serverless.js:133:33) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) From previous event: at Serverless.run (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\lib\Serverless.js:120:74) at serverless.init.then (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\bin\serverless.js:75:30) at C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\node_modules\graceful-fs\graceful-fs.js:111:16 at C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\node_modules\graceful-fs\graceful-fs.js:45:10 at FSReqWrap.oncomplete (fs.js:135:15) From previous event: at initializeErrorReporter.then (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\bin\serverless.js:75:8) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) From previous event: at Object.<anonymous> (C:\Users\bryan\AppData\Roaming\npm\node_modules\serverless\bin\serverless.js:64:4) at Module._compile (module.js:653:30) at Object.Module._extensions…js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3

Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Issues: forum.serverless.com

Your Environment Information --------------------------- Operating System: win32 Node Version: 8.12.0 Framework Version: 1.60.5 Plugin Version: 3.2.7 SDK Version: 2.2.1 Components Core Version: 1.1.2 Components CLI Version: 1.4.0`

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
bryanowen7commented, Mar 24, 2020

I have the same issue and verified that my credentials configured correctly. What did you have to change/correct?

@triluong21 My credentials were actually correct, but I forgot to specify the profile to use in the serverless.yml file, basically you have to add profile: <profile name> to provider in your serverless.yml

0reactions
Guilheeeermecommented, Sep 27, 2021

@bryanowen7 Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not locate deployment bucket. Error: Access Denied
I was facing the same issue, noticed this was happening because i was trying to deploy locally using sls deploy from my machine...
Read more >
Serverless Error: Could not locate deployment bucket. Error ...
I've tried this on a per-service basis and it seems like none of my buckets exist, yet I'm looking in S3 and cloudwatch...
Read more >
serverless/serverless - Gitter
... \n Could not locate deployment bucket. Error: Access Denied. any good way to get more debug information on what bucket it's trying...
Read more >
Serverless Deployment Bucket - Serverless Framework: Plugins
Create and configure the custom Serverless deployment bucket ... Could not locate deployment bucket. Error: The specified bucket does not exist ...
Read more >
Serverless deployment bucket
If the object exists in the bucket, then the Access Denied error isn't masking a 404 Not Found error. Verify other configuration requirements...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found