t3 turbo env vars

So I have a secret key that i am using in one of my api routes. Everything works fine but when i go to deploy in AWS amplify it doesnt work. I added it to the environment variables... I tried building with-env not sure why its not working.

Also have this issue with my cloudflare envs in amplify.

const s3 = new S3({
    // All of these are undefined for some reason in amplify :/
    endpoint: process.env.CLOUDFLARE_R2_URL,
    accessKeyId: process.env.CLOUDFLARE_KEY_ID,
    secretAccessKey: process.env.CLOUDFLARE_SECRET_KEY,
    signatureVersion: "v4",
});
Was this page helpful?