cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

AWS::Amplify::App with backend environments support

Open emilioschepis opened this issue 4 years ago • 5 comments

2. Scope of request

Currently, CloudFormation support for Amplify apps revolves around "frontend" resources (AutoBranchCreationConfig,BuildSpec,Repository...).

This issue requests support for:

  • adding and configuring "backend" resources like backend environments (currently they can be added via CLI)
  • associating frontend branches to backend environments (similar to what is already possible with 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.

emilioschepis avatar Jun 02 '21 23:06 emilioschepis

@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.

swaminator avatar Jun 03 '21 09:06 swaminator

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):

Backend environment example

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);

emilioschepis avatar Jun 03 '21 09:06 emilioschepis

Thank you for submitting the issue. We are researching.

brianterry avatar Jun 09 '21 17:06 brianterry

Thank you @brianterry , I'll keep an eye on the issue.

emilioschepis avatar Jun 09 '21 21:06 emilioschepis

I think this needs to add support for backendEnvironmentArn referenced in https://docs.aws.amazon.com/amplify/latest/APIReference/API_Branch.html

johnf avatar Feb 05 '24 03:02 johnf