Open emilioschepis opened 3 years ago
@emilioschepis can i understand a bit more about your usecase? You could use the Amplify CLI to automatically provision the backend infrastructure and have the CF templates associated.
Hi @swaminator , thank you for your reply. I think that the term "backend" could have been a bit misleading in this context. I do not need to define backend resources (like Auth, API, Storage...)
What i refer to is the "Backend Environment" that I can see from the Amplify console (i.e. dev
):
I would like to ideally define them in code. To give you an example of the desired use case in AWS CDK:
// Using the L2 construct for AWS Amplify
const amplifyApp = new amplify.App(this, "MyApplicationName", {});
// We can already create branches (AWS::Amplify::Branch)
const mainBranch = amplifyApp.addBranch("main", {});
// ⬇️ This is not currently an option, as CloudFormation does not support this resource ⬇️
const devEnvironment = amplifyApp.addBackendEnvironment("dev", {});
const prodEnvironment = amplifyApp.addBackendEnvironment("prod", {});
// It would be nice to also be able to connect the two, like we can do on the Amplify Console
// My guess is this would be an attribute of the AWS::Amplify::Branch definition
mainBranch.setBackendEnvironment(prodEnvironment);
Thank you for submitting the issue. We are researching.
Thank you @brianterry , I'll keep an eye on the issue.
I think this needs to add support for backendEnvironmentArn referenced in https://docs.aws.amazon.com/amplify/latest/APIReference/API_Branch.html
2. Scope of request
Currently, CloudFormation support for Amplify apps revolves around "frontend" resources (
AutoBranchCreationConfig
,BuildSpec
,Repository
...).This issue requests support for:
AWS::Amplify::Branch-PullRequestEnvironmentName
docs).3. Expected behavior
It should be possible to define frontend branches (already supported), backend environments, and automatically associate the two.
5. Helpful Links to speed up research and evaluation
Current CloudFormation support: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Amplify.html AWS CLI commands for amplify: https://docs.aws.amazon.com/cli/latest/reference/amplify/index.html#cli-aws-amplify
6. Category (required) - Will help with tagging and be easier to find by other users to +1
Front-end Web & Mobile
7. Any additional context (optional)
This would ideally be used to expand AWS CDK's L1 and L2 constructs for AWS Amplify.