aws-amplify / aws-amplify/amplify-cli
allow for pulling/integration of custom roles, policies
- 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?
_No response_
### Is this related to another service?
lambda
### Describe the feature you'd like to request
I created a pre-signup cognito lambda, to check against, and prevent duplicate emails, via the aws web interface.
I then had to create a policy to allow for the cognito ListUsers permission. I then had to edit my pre-signup cognito lambda's role, to add the policy I had just created (for cognito ListUsers).
At this point, ideally, I would have preferred to do something like 'amplify pull --appId xxxxxxx --envName dev' and have amplify detect that I had added the lambda, and be able to pull it into my current amplify project, along with the role and policy I created.
I think if you set up a dependency graph, amplify should be able to traverse the dependency graph and pull in custom lambdas, policies, roles, if they are part of the dependency graph.
As it is now, I ended up having to re-add a brand new lambda via 'amplify add function', and then I had to go the aws console and re-establish the pre-signup cognito link, and re-associate the aforementioned cognito ListUsers policy to this new lambda.
And, I have NO idea how to integrate the aws console changes so that it will work with Amplify going forwards. At this point, I think I would have manually go into the aws console, and manually check/fix the manual settings I had configured (create new permission policy, associate lambda with cognito pre-signup, add newly created permission policy with the lambda's current role), if I wanted to deploy to a different environment, such as prod.
### Describe the solution you'd like
At this point, ideally, I would have preferred to do something like 'amplify pull --appId xxxxxxx --envName dev' and have amplify detect that I had added the lambda, and be able to pull it into my current amplify project, along with the role and policy I created.
### Describe alternatives you've considered
manually adding policies, lambdas, roles via the aws console, and keeping notes so that I can do the same later on in a
different environment, such as prod.
### 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
Assessment
This issue has not been assessed yet.