#✅ - Amplify (Gen 2) fails

15 messages · Page 1 of 1 (latest)

dusk halo
#

How can I see why my project fails to build?

dusk halo
#

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

glad swift
dusk halo
#

It is when I run the sandbox that I get the error.

spring pecan
dusk halo
#

yes, will do

dusk halo
spring pecan
#

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?

dusk halo
#

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"}

spring pecan
#

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

dusk halo
#

ok

slender magnetBOT
#

✅ - Amplify (Gen 2) fails