You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to access secrets in my webhook. I am using Amplify Gen 1. I have entered the secrets under amplify > hosting settings > secrets, but I am unable to access them e.g. with process.env.WEBHOOK_SECRET (though accessing environment variables works fine) - but it just returns undefined when I log the secrets.
How can I access these secrets? On the amplify docs all I can see is "In Amplify Gen 1, you need to define environment variables and secrets using the CLI and store keys in both AWS Parameter Store and a local team-provider.json file."
Would be very helpful if there was actually further detail on accessing these. I cant see how I can do this in the CLI nor how the team-provider file should be edited.
Or is using process.env.WEBHOOK_SECRET just the wrong way to access them? If the secrets tab under hosting is just for Gen 2, it really should be specified on the page that this is the case.
The text was updated successfully, but these errors were encountered:
Amplify CLI Version
12.12.3
Question
I am trying to access secrets in my webhook. I am using Amplify Gen 1. I have entered the secrets under amplify > hosting settings > secrets, but I am unable to access them e.g. with
process.env.WEBHOOK_SECRET
(though accessing environment variables works fine) - but it just returns undefined when I log the secrets.How can I access these secrets? On the amplify docs all I can see is "In Amplify Gen 1, you need to define environment variables and secrets using the CLI and store keys in both AWS Parameter Store and a local team-provider.json file."
Would be very helpful if there was actually further detail on accessing these. I cant see how I can do this in the CLI nor how the team-provider file should be edited.
Or is using
process.env.WEBHOOK_SECRET
just the wrong way to access them? If the secrets tab under hosting is just for Gen 2, it really should be specified on the page that this is the case.The text was updated successfully, but these errors were encountered: