Closed sunmingtao closed 4 years ago
Upload function.zip to the lambda function Test
{ "errorType": "AccessDenied", "errorMessage": "Access Denied", "trace": [ "AccessDenied: Access Denied", " at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/services/s3.js:816:35)", " at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)", " at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)", " at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)", " at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)", " at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)", " at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10", " at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)", " at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)", " at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)" ] }
Edit the role and attach AmazonS3ReadOnlyAccess policy to the role
Upload function.zip to the lambda function Test