#✅ - Amplify (Gen 2) fails
15 messages · Page 1 of 1 (latest)
Perhaps it's related, but I can also not use secrets:
Received response status [FAILED] from custom resource. Message returned: Failed to retrieve backend secret 'GITHUB_CLIENT_ID' for 'resumia'. Reason: {"cause":{"name":"ParameterNotFound","$fault":"client","$metadata":{"httpStatusCode":400,"requestId":"724e8325-b737-417b-9f3b-f47e1c8c314b","attempts":1,"totalRetryDelay":0},"__type":"ParameterNotFound","message":"UnknownError"},"httpStatusCode":400,"name":"SecretError"}
Even though they should be there:
% npx amplify sandbox secret list
names: GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET
The "sandbox" secret is different from when you're deploying a production branch. You'll have to set your production secret values like in this doc: https://docs.amplify.aws/gen2/deploy-and-host/fullstack-branching/secrets-and-vars/
Since my production fails, I can only use sandbox secrets, I assume, and they fails:
https://discordapp.com/channels/705853757799399426/1188919334551171133/1188923605480915065
It is when I run the sandbox that I get the error.
@dusk halo could you open a github issue on https://github.com/aws-amplify/amplify-backend with information on the behavior you are experiencing
yes, will do
thank you for the Github issue, just to better understand the issue.
Do you add the secrets on the Amplify console? then rebuild the environment.
It is when I run the sandbox that I get the error.
Wanted to get some information on this, are you seeing the issue locally as well?
If I uncomment this code, it fails:
import { defineAuth, secret } from '@aws-amplify/backend';
const HostnameApi = 'api.resumia.app';
/**
- Define and configure your auth resource
- When used alongside data, it is automatically configured as an auth provider for data
- @see https://docs.amplify.aws/gen2/build-a-backend/auth
*/
export const auth = defineAuth({
loginWith: {
email: true,
// externalProviders: {
// oidc: {
// name: 'GitHub',
// clientId: secret('GITHUB_CLIENT_ID'),
// clientSecret: secret('GITHUB_CLIENT_SECRET'),
// issuerUrl: 'https://github.com/',
// endpoints: {
// authorization: 'https://github.com/login/oauth/authorize',
// token:https://${HostnameApi}/github/proxy/token,
// userInfo:https://${HostnameApi}/github/proxy/user,
// jwksUri:https://${HostnameApi}/github/proxy/token,
// },
// },
// },
},
});
I can see secrets in my sandbox with npx amplify sandbox secret list
The error I get when I uncomment the code is:
The CloudFormation deployment has failed. Find more information in the CloudFormation AWS Console for this stack.
Caused By: ❌ Deployment failed: Error: The stack named amplify-resumia-jacob-sandbox-8865f6f59f failed to deploy: UPDATE_ROLLBACK_COMPLETE: Received response status [FAILED] from custom resource. Message returned: Failed to retrieve backend secret 'GITHUB_CLIENT_ID' for 'resumia'. Reason: {"cause":{"name":"ParameterNotFound","$fault":"client","$metadata":{"httpStatusCode":400,"requestId":"a239ac5e-9626-4672-9fe7-856514aef940","attempts":1,"totalRetryDelay":0},"__type":"ParameterNotFound","message":"UnknownError"},"httpStatusCode":400,"name":"SecretError"}
thank you for the information, let me move this information to the Github issue. we can continue the conversation on the issue as it would also be visible to the Amplify team
ok
✅ - Amplify (Gen 2) fails