- Add secret definition to backend.ts using proper Amplify Gen 2 syntax - Update amplify.yml to include backend build phase - This should properly expose secrets as environment variables 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
18 lines
469 B
TypeScript
18 lines
469 B
TypeScript
import { defineBackend, secret } from '@aws-amplify/backend';
|
|
import { auth } from './auth/resource';
|
|
import { data } from './data/resource';
|
|
|
|
/**
|
|
* @see https://docs.amplify.aws/react/build-a-backend/ to add storage, functions, and more
|
|
*/
|
|
const backend = defineBackend({
|
|
auth,
|
|
data,
|
|
});
|
|
|
|
// Define secrets that will be available as environment variables
|
|
backend.addOutput({
|
|
custom: {
|
|
YOUTUBE_API_KEY: secret('YOUTUBE_API_KEY'),
|
|
},
|
|
});
|