Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitting error using COPY to S3 #92

Open
minni89 opened this issue Jan 5, 2025 · 4 comments
Open

Hitting error using COPY to S3 #92

minni89 opened this issue Jan 5, 2025 · 4 comments

Comments

@minni89
Copy link

minni89 commented Jan 5, 2025

Can anyone help with the following error

test_db=# COPY (SELECT * FROM pgbench_tellers) TO 's3://pqtests/table4.parquet' WITH (format 'parquet');
ERROR:  failed to close parquet writer: External: Generic S3 error: Client error with status 404 Not Found: The requested URL was not found on this server.
@aykut-bozkurt
Copy link
Collaborator

seems like the bucket does not exist. (or please make sure you set endpoint (AWS_ENDPOINT_URL) correct )

@minni89
Copy link
Author

minni89 commented Jan 7, 2025

I'm able to write data to bucket using aws s3 cp, AWS_ENDPOINT_URL is also correct.

@aykut-bozkurt
Copy link
Collaborator

Is that a local machine? Can you share the environment variables and aws config file with redacted secrets?

@minni89
Copy link
Author

minni89 commented Jan 8, 2025

Yes, it's a local machine.
postgres@hostname:~$ aws s3 cp /etc/postgresql/17/main/data.parquet s3://pqtests/table4.parquet
upload: ../../../etc/postgresql/17/main/data.parquet to s3://pqtests/table4.parquet

postgres@hostname-7490:~$ cat ~/.aws/credentials
[postgres]
aws_access_key_id =
aws_secret_access_key =
[default]
aws_access_key_id =
aws_secret_access_key =

postgres@hostname-7490:~$ cat ~/.aws/config
[postgres]
region =
output = none
[default]
region =
output =none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants