Skip to content

Commit

Permalink
Add public AWS S3 credentions to boto client
Browse files Browse the repository at this point in the history
  • Loading branch information
eldon-tuva committed Jun 21, 2024
1 parent b9a5120 commit e7f1a45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

This script will load the Tuva Health seed data from AWS S3 into a Postgres database.

This script assumes you already have your AWS environment variables set.

To use please create a `config.yml` file. You can use the `config.yml.example` as a template.

If you prefer, you can also specify the configs via the command line instead of using a config file.
Expand Down
7 changes: 6 additions & 1 deletion s3-to-postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def parse_dbt_project_yml(file_path):

# Step 2: Download files from S3
def download_files_from_s3(s3_paths, download_dir):
s3 = boto3.client('s3')
s3 = boto3.client(
service_name="s3",
region_name="us-east-1",
aws_access_key_id="AKIA2EPVNTV4FLAEBFGE",
aws_secret_access_key="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",
)

for schema, table, s3_path, filename_pattern in s3_paths:
bucket_name, s3_prefix = s3_path.split('/', 1)
Expand Down

0 comments on commit e7f1a45

Please sign in to comment.