Skip to content

unexpected OAuthCustomResourceInputs error on push after updating unrelated resource #11495

Open
@josefaidt

Description

@josefaidt

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?

pnpm

If applicable, what version of Node.js are you using?

18

Amplify CLI Version

10.5.1

What operating system are you using?

mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

n/a

Amplify Categories

auth

Amplify Commands

Not applicable

Describe the bug

As I was using a project to reproduce this exact issue I was initially unsuccessful, however after coming back to the project and making updates to unrelated resources (like adding a new function) I am presented with this error:

🛑 The following resources failed to deploy:
Resource Name: OAuthCustomResourceInputs (Custom::LambdaCallout)
Event Type: create
Reason: Received response status [FAILED] from custom resource. Message returned: See the details in CloudWatch Log Stream: 2022/11/29/[$LATEST]c86010aa8fe0497c875afa39324c7f39 (RequestId: 434f8e76-e11f-4f7d-ac50-6d015663b425)

In CloudWatch I see the following:

2022-11-23T17:24:50.862Z	b5562efd-a55f-403f-b1c5-ea603a59560c	INFO	{
  UserPoolId: 'us-east-1_dpwM86ARD',
  AllowedOAuthFlows: [ 'code' ],
  AllowedOAuthFlowsUserPoolClient: true,
  AllowedOAuthScopes: [
    'phone',
    'email',
    'openid',
    'profile',
    'aws.cognito.signin.user.admin'
  ],
  CallbackURLs: [ 'http://localhost:3000/' ],
  LogoutURLs: [ 'http://localhost:3000/' ],
  SupportedIdentityProviders: [ 'Facebook', 'Google', 'COGNITO' ]
}

2022-11-23T17:24:51.885Z	b5562efd-a55f-403f-b1c5-ea603a59560c	INFO	InvalidParameterException: The provider Facebook does not exist for User Pool us-east-1_dpwM86ARD.
    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)
    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)
    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12)
    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)

This is the exact behavior as shown in an older bug #7388 (comment)

Workaround

  1. amplify update auth
  2. update OAuth Social Providers
  3. re-input secrets (NOTE: the values are not pre-filled from before)

Expected behavior

n/a

Reproduction steps

  1. amplify init -y
  2. amplify add auth > Add social providers, provide fake values for OAuth
  3. amplify push -y
  4. observe push is successful
  5. do something else, amplify add function
  6. amplify push -y
  7. observe error

GraphQL schema(s)

# Put schemas below this line

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues tied to the auth category of the CLIbugSomething isn't workingp2regressionFlair label to track regressions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions