Closed ggj0418 closed 5 months ago
I'm sorry for the confusion.
the reason of this issue was the npx ampx sandbox secret set
command's option parameter.
i set the secret with just a --profile
. after that, i created my sandbox environment with --profile
and --identifier
.
so the created secret on the aws parameter store had a different identifier with my sandbox environment.
it was my big mistake. sorry
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication, REST API, GraphQL API
Amplify Version
v6
Amplify Categories
function
Backend
Amplify Gen 2 (Preview)
Environment information
Describe the bug
passed value from sandbox secret to a function's env always has this literal value
value will be resolved during runtime
Expected behavior
when i check the value sent as a query named
testKey
on the urihttps://example.com/health-check
, i expected the query value would be a real value as i set on my sandbox with my profile.Reproduction steps
npx ampx sandbox secret set NEXT_PUBLIC_TEST_KEY --profile ${USER}
. it doesn't matter which value is set/amplify/functions/test-function/handler.ts
, you have to replace the uri with your own one that could receive the request. please check the TODOnpx ampx sandbox --profile ${USER} --identifier ${USER}
value will be resolved during runtime
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response