Skip to content

Commit

Permalink
add aws env configs
Browse files Browse the repository at this point in the history
  • Loading branch information
AvidDabbler committed Feb 4, 2024
1 parent 374c137 commit eece06b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/config.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const config = () => {
AGENCY_NAME: z.string(),
MAPBOX_ACCESS_TOKEN: z.string(),
GTFS_URL: z.string(),
S3_BUCKET: z.string()
S3_BUCKET: z.string(),
AWS_ACCESS_KEY_ID: z.string(),
AWS_SECRET_ACCESS_KEY: z.string()
})
.parse(process.env);
return _config;
Expand Down
4 changes: 4 additions & 0 deletions drizzle/backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { S3Client, CopyObjectCommand } from '@aws-sdk/client-s3'

const s3Client = new S3Client({
region: "us-east-1", // Replace with your AWS region
credentials: {
accessKeyId: envConfig.AWS_ACCESS_KEY_ID, // Replace with your AWS access key ID
secretAccessKey: envConfig.AWS_SECRET_ACCESS_KEY
},
});

// Function to perform S3 object copy (backup)
Expand Down

0 comments on commit eece06b

Please sign in to comment.