Hello, We have a package that deploys API gateways / Lambda functions using cloudformation templates and this works successfully in our local environment with a dev AWS instance. We do this with a user which assumes a role that has required perms
During deploying to another environment which has far more restrictions, we generated some policy files for the role with required perms in that environment but run into an error -
it seems to create the initial Cloudformation template and the S3 bucket and then throws this error
Can someone help with what step could cause this error? The role has full access to the bucket it created .
Serverless: Stack create finished…
Serverless: Ensuring that deployment bucket exists
Serverless: [AWS cloudformation 200 0.086s 0 retries] describeStackResource({
StackName: ‘XXXX-test2’,
LogicalResourceId: ‘ServerlessDeploymentBucket’
})
Serverless: [AWS s3 200 0.057s 0 retries] headBucket({
Bucket: ‘XXXX-test2-serverlessdeploymentbucket-c64hxfngdatp’
})
Serverless: [AWS s3 200 0.125s 0 retries] listObjectsV2({
Bucket: ‘XXXX-test2-serverlessdeploymentbucket-c64hxfngdatp’,
Prefix: ‘serverless/XXXX/test2’
})
erverless Error ----------------------------------------
ServerlessError: AccessDenied: Access Denied
at Request.extractError (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/services/s3.js:699:35)
at Request.callListeners (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:38:9)
at Request. (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:688:12)
at Request.callListeners (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at Request.emit (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:38:9)
at Request. (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/request.js:688:12)
at Request.callListeners (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at callNextListener (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
at IncomingMessage.onEnd (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/node_modules/aws-sdk/lib/event_listeners.js:335:13)
at IncomingMessage.emit (events.js:412:35)
at IncomingMessage.emit (domain.js:475:12)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
at /homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/lib/aws/request.js:225:11
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async persistentRequest (/homenode/node-v14.18.0-linux-x64/lib/node_modules/serverless/lib/aws/request.js:149:14)