-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to control resources conditional on which environment Amplify is deploying to #13860
Comments
related: #1115 |
Hey, this is currently not supported on Amplify CLI. But the workaround would be to utilize the
Marking as feature request |
Thanks for the reply, thats really helpful to know. I ended up at this conclusion and had already implemented pretty much exactly what you suggested. Seems like if this functionality doesn't already exist then its a huge, core-level change so I should not expect anything in the immediate future? Is there no way to manually modify the underlying cloudformation in order to acheive this? |
Amplify CLI Version
12.12.4
Question
Hi there,
I've got a multi-environment project built with Amplify 12.12.4, Gen 1. Each environment (dev, sandbox, prod) deploys into it's own AWS account.
The project is basically hosting an s3-and-cloudfront site with cognito auth. The project is hooked up to be using amplify hosting/CI just like in this guide https://docs.amplify.aws/gen1/react/deploy-and-host/deployment/deploy-static-site-github/#deploy-your-app-to-aws-amplify
We have a requirement for a cognito pre-authentication lambda trigger to run some custom check before sign-in, but we only need this in prod.
I have successfully configured the lambda, but on all 3 environments; I only need it on prod. I can't find an straightforward way of configuring this through code.
It seems like based on answers such as #4875 that the answer relies on running amplify commands with the
--restore
flag, but this obviously isn't a persistent, source-control-backed change that will survive through CI etc.How can this environment-specific behvaiour be represented through code?
TL;DR: How can I configure, through commitable code, for cognito auth to have a trigger lambda, but in one amplify environment only
Thanks
The text was updated successfully, but these errors were encountered: