Skip to content

Provide a way to make REST API calls at the method level without reaching out to Cognito #14460

Open
@tonyawad88

Description

@tonyawad88

Is this related to a new or existing framework?

No response

Is this related to a new or existing API?

REST API

Is this related to another service?

No response

Describe the feature you'd like to request

Currently, when using Amplify v6's REST API client (get, post, put, etc. from aws-amplify/api), all requests automatically attempt to authenticate through
Cognito, even when calling public API endpoints that don't require authentication. This results in unnecessary calls to AWSCognitoIdentityService.GetId
and can cause performance overhead and potential errors for public endpoints.

Describe the solution you'd like

Add an authMode option to the REST API method options that allows developers to specify authentication behavior at the method level.
Suggested authMode values:
• 'none' - No authentication, skip Cognito calls entirely

Describe alternatives you've considered

Developers currently have to:

  1. Use native fetch() instead of Amplify's REST client
  2. Accept the performance overhead of unnecessary Cognito calls

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIRelated to REST API issuesfeature-requestRequest a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions