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

Migration requires S3 configuration #1229

Open
jasonaowen opened this issue Sep 27, 2024 · 0 comments
Open

Migration requires S3 configuration #1229

jasonaowen opened this issue Sep 27, 2024 · 0 comments

Comments

@jasonaowen
Copy link
Contributor

jasonaowen commented Sep 27, 2024

Running the database migrations fails if the S3-related environment variables are not provided. This is both surprising and violates the principle of least privilege.

$ npm run migrate

> migrate
> ts-node src/scripts/migrate.ts | pino-pretty

src/s3Client.ts:10
} = requireEnv(
              ^
Error: Environment variables missing: [ "S3_ACCESS_KEY_ID", "S3_ACCESS_SECRET", "S3_ENDPOINT", "S3_PATH_STYLE", "S3_REGION" ]
    at Object.<anonymous> (src/s3Client.ts:10:15)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module.m._compile (node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Object.require.extensions.<computed> [as .ts] (node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1024:12)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (src/tasks/processBulkUpload.ts:6:1)
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

1 participant