aws-amplify / aws-amplify/amplify-cli

RFC: Importing Existing AWS Resources to Amplify Project using the Amplify CLI

Open
#3,977 66 comments 246 reactions 0 assignees View on GitHub
rfc
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

Currently, the CLI provisions new AWS resources based on the categories that you add to your Amplify project.
This RFC is to gauge community interest and hear more thoughts around the CLI being able to import existing resources into an Amplify project.

As an MVP, we’re planning to support importing of resources in the following categories:

* Auth
* Storage (S3 & DynamoDB)
* API - REST and GraphQL (to use existing data sources and auth resources)

We’ll be relying heavily on the new CloudFormation import functionality - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-existing-stack.html for this feature

**Auth**

* Ability to add an existing Cognito user pool to an Amplify backend environment as a part of the amplify add auth flow
* Ability to specify a new or use the same Cognito user pool used in an existing environment when creating a new Amplify backend environment
* Ability to update and manage the imported Cognito user pool via the CLI as a part of the amplify update auth flow to add features like Lambda triggers to your existing Cognito user pool

**Storage**

* Ability to add an existing S3 bucket as a part of the amplify add storage flow
* Ability to add an existing DynamoDB table as a part of the amplify add storage flow
* Ability to update and manage the imported and S3 and DynamoDB tables as a part of the amplify update storage flow
* Ability to specify a new or use the same S3 & DynamoDB tables used in an existing environment when creating a new Amplify backend environment

**API**

*GraphQL API*

* Ability to use existing DynamoDB tables as a part of @model directive as a part of the GraphQL transformer annotated schema
* Ability to use an existing Cognito user pool for authorization as a part of the amplify add/update flow
* Ability to modify or use the same Cognito user pool for authorization between different Amplify backend environments

*REST API*

* Ability to add an existing API Gateway resource using the amplify add api flow
* Ability to use an existing Lambda resource with an API Gateway resource as a part of the amplify add/update api flow
* Ability to update or manage the imported API Gateway resource as a part of the amplify update api flow
* Ability to specify a new or use the same API Gateway resource used in an existing environment when creating a new Amplify backend environment

Please comment on this thread if you have some thoughts or suggestions on this feature or if you think we’re missing any story points which you would love to see as a part of this feature.

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.