You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're running Interval Server on AWS ECS and we're currently getting some issues while trying to set up file uploads. The server requires us to pass S3_REGION, S3_KEY_ID, and S3_KEY_SECRET, but that should not be necessary when running it on AWS, as one can leverage using the task IAM role in order to access S3.
After installing interval-server, we're sed-ing dist/src/server/utils/uploads.js:
sed -i -e '/credentials: {/{N;N;N;d;}'"/usr/local/lib/node_modules/@interval/server/dist/src/server/utils/uploads.js"
This simply removes setting the credentials, letting the SDK resolve the credentials dynamically.
Possible solution
Ideally, we should be able to specify only the S3_BUCKET environment variable, and let the other options (S3_REGION, S3_KEY_ID, and S3_KEY_SECRET) be optional. This way, if they're present in the environment, we can use them, otherwise, we let the SDK resolve the credentials dynamically.
Something like this should probably work, although I haven't tested with this code exactly:
Hi there!
We're running Interval Server on AWS ECS and we're currently getting some issues while trying to set up file uploads. The server requires us to pass
S3_REGION
,S3_KEY_ID
, andS3_KEY_SECRET
, but that should not be necessary when running it on AWS, as one can leverage using the task IAM role in order to access S3.Some references:
Current workaround
Our current workaround for this is to patch the code and remove the part where it sets the
credentials
for S3:server/src/server/utils/uploads.ts
Lines 38 to 41 in 6e94996
After installing
interval-server
, we'resed
-ingdist/src/server/utils/uploads.js
:This simply removes setting the credentials, letting the SDK resolve the credentials dynamically.
Possible solution
Ideally, we should be able to specify only the
S3_BUCKET
environment variable, and let the other options (S3_REGION
,S3_KEY_ID
, andS3_KEY_SECRET
) be optional. This way, if they're present in the environment, we can use them, otherwise, we let the SDK resolve the credentials dynamically.Something like this should probably work, although I haven't tested with this code exactly:
The text was updated successfully, but these errors were encountered: