Open
Description
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:
- Use native fetch() instead of Amplify's REST client
- 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