Review the following changes in direct dependencies. Learn more about Socket for GitHub.
aws-sdk v2 usage to AWS SDK v3 for S3/R2 object storage and presigned URLs.@composio/db.This moves AWS-facing code toward passwordless deployment on Vercel:
The PR intentionally keeps fallback behavior so existing environments do not need to migrate all secrets in one deploy.
aws-sdk v2 S3 client usage with:
@aws-sdk/client-s3@aws-sdk/s3-request-presigneraws-sdk dependency..promise() and getSignedUrlPromise to v3 commands and getSignedUrl.Adds apps/apollo/src/common/lib/external/aws_credentials.ts.
Behavior:
Relevant envs:
AWS_ROLE_ARNAWS_REGIONVERCELVERCEL_OIDC_TOKENVERCEL_DEPLOYMENT_IDS3 now uses AWS SDK v3 S3Client.
Credential behavior:
S3_AWS_ROLE_ARN when set.AWS_ROLE_ARN only for AWS S3 endpoints.S3_ACCESS_KEY_ID + S3_SECRET_ACCESS_KEY.Relevant envs:
S3_AWS_ROLE_ARNAWS_ROLE_ARNS3_ACCESS_KEY_IDS3_SECRET_ACCESS_KEYS3_ENDPOINT_URLS3_REGIONS3_FORCE_PATH_STYLEBedrock provider creation now supports:
AWS_BEDROCK_ROLE_ARNAWS_ROLE_ARNAWS_BEDROCK_ACCESS_KEY_ID + AWS_BEDROCK_SECRET_ACCESS_KEYReranker availability checks now consider role-based Bedrock configuration.
Thermos AWS utils now support:
AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEYAWS_ROLE_ARN and VERCEL_OIDC_TOKENStatic keys still take precedence to avoid changing existing deployments.
Relevant envs:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_ROLE_ARNAWS_ROLE_SESSION_NAMEVERCEL_OIDC_TOKENAdds passwordless RDS IAM auth in @composio/db.
Existing behavior remains:
DATABASE_IAM_AUTH is not true, Prisma uses DATABASE_URL exactly as before.Passwordless behavior:
DATABASE_IAM_AUTH=true.DATABASE_URL or discrete IAM DB env vars.@aws-sdk/rds-signer.Example passwordless URL:
DATABASE_IAM_AUTH=true
DATABASE_URL='postgresql://db_user@rds-proxy-host:5432/db_name?schema=public&sslmode=require'
AWS_REGION='us-east-1'
AWS_ROLE_ARN='arn:aws:iam::<account-id>:role/<vercel-oidc-role>'
Equivalent discrete configuration:
DATABASE_IAM_AUTH=true
DATABASE_IAM_HOST='rds-proxy-host'
DATABASE_IAM_PORT='5432'
DATABASE_IAM_DATABASE='db_name'
DATABASE_IAM_USER='db_user'
DATABASE_IAM_REGION='us-east-1'
DATABASE_IAM_ROLE_ARN='arn:aws:iam::<account-id>:role/<vercel-oidc-role>'
DATABASE_IAM_SCHEMA='public'
DATABASE_IAM_SSL_MODE='require'
Read replica / read proxy support:
DATABASE_READ_URL can be passwordless when DATABASE_READ_IAM_AUTH=true.DATABASE_READ_IAM_* values override primary DATABASE_IAM_* values.DATABASE_READ_URL is absent and DATABASE_IAM_AUTH=true, read Prisma inherits the primary IAM DB settings.Read envs:
DATABASE_READ_URL
DATABASE_READ_IAM_AUTH
DATABASE_READ_IAM_HOST
DATABASE_READ_IAM_PORT
DATABASE_READ_IAM_DATABASE
DATABASE_READ_IAM_USER
DATABASE_READ_IAM_REGION
DATABASE_READ_IAM_ROLE_ARN
DATABASE_READ_IAM_ROLE_SESSION_NAME
DATABASE_READ_IAM_SCHEMA
DATABASE_READ_IAM_SSL_MODE
Prisma client construction was synchronous before this PR, but RDS IAM token generation is async.
To keep existing call sites unchanged, this PR adds a lazy Prisma client wrapper:
prisma and readPrismaClient.prisma.model.method(...) call sites continue to work.$use and $on registrations are queued before initialization and applied to the real client.This avoids top-level await because @composio/db still bundles to CJS.
DATABASE_URL deployments continue working.prisma, readPrismaClient, or Apollo object storage.For full passwordless AWS operation on Vercel:
AWS_ROLE_ARN or the service-specific role ARN envs.rds-db:connect for the DB user/resource ID used by RDS Proxy/RDS IAM authpnpm --dir apps/apollo exec oxlint <changed Apollo files>pnpm --dir apps/apollo exec oxlint src/env.tspnpm --dir packages/db bundlepnpm --dir packages/db testenv GOCACHE=/private/tmp/hermes-aws-oidc-go-cache go test ./lib/awsutilsoxlint/oxfmt.build:openapi.pnpm --dir apps/apollo check-types still fails on existing generated/Prisma/type issues outside the touched AWS files.Review the following changes in direct dependencies. Learn more about Socket for GitHub.