# S3 Compatible API Issue

**URL:** <https://community.palantir.com/t/s3-compatible-api-issue/710>\
**Category:** Ask the Community\
**Tags:** foundry-s3-proxy\
**Created:** [July 12, 2024, 5:23pm UTC](https://community.palantir.com/t/s3-compatible-api-issue/710 "2024-07-12T17:23:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sean](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/sean/32/214_2.png) [@sean](https://community.palantir.com/u/sean)\
**Post date:** [July 12, 2024, 5:23pm UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/1 "2024-07-12T17:23:17Z")

</div>

Has anyone gotten the s3 compatible api layer to work with foundry datasets.

I’ve followed [this guide](https://www.palantir.com/docs/foundry/data-integration/foundry-s3-api/) to set up the aws cli to point to Foundry but I get a permissions error when trying to run the cli example

```auto
 aws --profile foundry s3 ls s3://dataset-id

An error occurred (AccessDenied) when calling the ListObjectsV2 operation: ServiceException: PERMISSION_DENIED (S3Proxy:PermissionDenied): {permissions={ri.foundry.main.dataset.dataset-id=[s3-proxy:datasets-read]}} (314b8251-af45-431f-98e1-04e0834171da

```

I have removed the dataset id above but i am passing a valid id

---

<div class="post-metadata">

**Author:** ![cdesouza](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@cdesouza](https://community.palantir.com/u/cdesouza)\
**Post date:** [July 12, 2024, 7:20pm UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/2 "2024-07-12T19:20:21Z")

</div>

Hi @sean - can you confirm whether you are using [static credentials](https://www.palantir.com/docs/foundry/data-integration/foundry-s3-api/#static-credentials) associated with a service user or [temporary credentials](https://www.palantir.com/docs/foundry/data-integration/foundry-s3-api/#temporary-credentials) associated with your user account? Depending on which user we’re dealing with, what roles does that user have on the dataset you’re trying to read?

---

<div class="post-metadata">

**Author:** ![sean](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/sean/32/214_2.png) [@sean](https://community.palantir.com/u/sean)\
**Post date:** [July 15, 2024, 9:47pm UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/3 "2024-07-15T21:47:26Z")

</div>

Thanks for the reply, I missed a step in which i needed to grant the service user access to the project. I got the CLI to work but still having an issue where duckdb is running into a 403

HTTP GET error on ‘https://host/io/s3/dataset-rid/spark/dataset.parquet’ (HTTP 403)

---

<div class="post-metadata">

**Author:** ![nicornk](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/nicornk/32/192_2.png) [@nicornk](https://community.palantir.com/u/nicornk)\
**Post date:** [July 16, 2024, 1:59pm UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/4 "2024-07-16T13:59:49Z")

</div>

This works for me, with duckdb 1.0.0:

```auto
import duckdb

con = duckdb.connect()
creds = {'access_key': 'PLTR...',
 'secret_key': '...',
 'token': '...'}
endpoint = "stack.palantirfoundry.com/io/s3"

con.execute(
    """
CREATE SECRET foundryConnection (
    TYPE S3,
    KEY_ID '{access_key}',
    SECRET '{secret_key}',
    SESSION_TOKEN '{token}',
    ENDPOINT '{endpoint}',
    URL_STYLE 'path',
    REGION 'foundry'
);
""".format(**creds, endpoint=endpoint)
)
df = con.execute(
    "SELECT * FROM read_parquet('s3://ri.foundry.main.dataset.d5308d45-9822-4e02-afb9-2704636308ee/**/*.parquet') LIMIT 1;"
).df() # replace with a dataset RID of yours, should be a dataset with parquet files

print(df.head())

```

---

<div class="post-metadata">

**Author:** ![sean](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/sean/32/214_2.png) [@sean](https://community.palantir.com/u/sean)\
**Post date:** [July 16, 2024, 3:41pm UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/5 "2024-07-16T15:41:47Z")

</div>

Thank you, I’ll try using temporary credentials with the session option.

---

<div class="post-metadata">

**Author:** ![tpowell](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@tpowell](https://community.palantir.com/u/tpowell)\
**Post date:** [July 19, 2024, 3:55pm UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/6 "2024-07-19T15:55:10Z")

</div>

When creating static credentials you should have setup a third-party application and configured a set of projects for which those credentials will be restricted.

The dataset you are querying needs to be in one of those projects.

You should also make sure that the third-party app has client credentials enabled. This will create a service user for that third-party app. The service user associated with the third-party app needs to be given permission to the projects and any markings on those projects - ultimately the service user needs to have access to the dataset.

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [December 29, 2024, 5:38am UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/7 "2024-12-29T05:38:25Z")

</div>

Automatically bumped on December 29, 2024, 5:38am UTC



---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [June 16, 2025, 4:35pm UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/8 "2025-06-16T16:35:20Z")

</div>

Automatically bumped on June 16, 2025, 4:35pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [July 17, 2026, 8:15am UTC](https://community.palantir.com/t/s3-compatible-api-issue/710/9 "2026-07-17T08:15:37Z")

</div>

Automatically bumped on July 17, 2026, 8:15am UTC


