- Create Lambda function with secret environment variable - Add YouTube API function to backend configuration - Create Next.js API route to handle YouTube requests - Update gallery page to use API route - This follows the correct Amplify Gen 2 pattern for secrets 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
8 lines
No EOL
203 B
TypeScript
8 lines
No EOL
203 B
TypeScript
import { defineFunction, secret } from '@aws-amplify/backend';
|
|
|
|
export const youtubeApi = defineFunction({
|
|
name: 'youtube-api',
|
|
environment: {
|
|
YOUTUBE_API_KEY: secret('YOUTUBE_API_KEY'),
|
|
},
|
|
}); |