# How to make a get object request on an s3 bucket

**URL:** <https://forum.serverless.com/t/how-to-make-a-get-object-request-on-an-s3-bucket/16070>\
**Category:** Serverless Framework\
**Tags:** lambda, iam\
**Created:** [October 12, 2021, 9:32am UTC](https://forum.serverless.com/t/how-to-make-a-get-object-request-on-an-s3-bucket/16070 "2021-10-12T09:32:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaykhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kaykhan/32/6267_2.png) [@kaykhan](https://forum.serverless.com/u/kaykhan)\
**Post date:** [October 12, 2021, 9:32am UTC](https://forum.serverless.com/t/how-to-make-a-get-object-request-on-an-s3-bucket/16070/1 "2021-10-12T09:32:13Z")

</div>

I have a lambda function that makes a GetObject request to an s3 bucket. However im getting the following error:

> AccessDenied: Access Denied\n at deserializeAws\_restXmlGetObjectCommandError (/node\_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws\_restXml.js:6284:41)

I thought i had given access to the lambda function to make this request.

```auto
        provider.iamRoleStatements: [
            {
                Effect: "Allow",
                Action: ["s3:GetObject"],
                Resource: "arn:aws:s3:::<redacted>",
            },
        ],

```

---

<div class="post-metadata">

**Author:** ![beenmeckel](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@beenmeckel](https://forum.serverless.com/u/beenmeckel)\
**Post date:** [November 7, 2021, 8:51pm UTC](https://forum.serverless.com/t/how-to-make-a-get-object-request-on-an-s3-bucket/16070/2 "2021-11-07T20:51:31Z")

</div>

CORS is for Requests made with an Options header. If you have only granted s3:GetObject access to anyone then that is why you can perform a Get Object request but not a List bucket which [Showbox](https://showbox.bio/) [jiofi.local.html](https://jfi.uno/jiofilocalhtml) [tplinklogin](https://adminlogin.co/tplinklogin/) requires the s3:ListBucket permission.
