aws-amplify / aws-amplify/amplify-cli

Only create UserPoolClientCustomResource if it is required

Open
#12,282 2 comments 0 reactions 0 assignees View on GitHub
auth feature-request ops-auth p4 pending-review
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Is this feature request related to a new or existing Amplify category?

auth

### Is this related to another service?

Cognito

### Describe the feature you'd like to request

Only create `UserPoolClientCustomResource` if it is required.

https://github.com/aws-amplify/amplify-cli/blob/fec2958513228e60b3f58d456f60677c738ae25c/packages/amplify-category-auth/src/provider-utils/awscloudformation/auth-stack-builder/auth-cognito-stack-builder.ts#L484

### Describe the solution you'd like

The work I'm currently doing has a lot of restrictions for creating roles. Currently when I `amplify add auth` and push a CF stack is created that includes a lambda function and role to retrieve the `AppClientSecret`.

My stack doesn't use the `AppClientSecret` and I see there's a parameter passed to the stack `userpoolClientGenerateSecret`. This parameter is `false` in my case, so the `AppClientSecret` isn't in the stack outputs.

Can this be updated to never create the lambda and role when it isn't used?

### Describe alternatives you've considered

I would meet my requirements, if I could create the role outside Amplify and pass it in as a parameter. In this case the role isn't used so would be even better if it isn't created in the first place.

### Additional context

_No response_

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

- [ ] 👋 I may be able to implement this feature request

### Would this feature include a breaking change?

- [ ] ⚠️ This feature might incur a breaking change

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.