Creating & Managing Multiple Serverless AWS Environments Using the AWS Amplify CLI

nader dabit
Instructornader dabit
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 3 years ago

In this video we show how to spin up new environments using the AWS Amplify CLI to test out new features & then merge the new features back into a main AWS Amplify environment.

Instructor: [00:01] To get started, we'll initialize a new Amplify project by running amplify init. The specifics of the environment won't matter for the purposes of this demo, so feel free to set your environment up however you like. Now that the Amplify project has been initialized, we'll go ahead and add authentication by running amplify add auth.

[00:56] Next, we'll run amplify push to create the authentication resource in our account. Now, we'll run amplify status to see the current environment that we're working in and the categories that are currently enabled. I'm currently in the dev environment, and the only category that I have enabled is auth.

[01:26] Now, let's initialize a new environment from our existing environment. To do so, we'll run amplify init. When asked if we want to choose an existing environment, we'll choose no. Next, we're prompted for the environment name. This will be the name of the new environment based on our existing environment. I'll give this environment a name of API feature.

[01:54] After the new environment has been initialized, we should be able to run amplify status and see the current environment set to the new environment that we just created. We can also run amplify ENV list to view all of the current environments available in our project. From within the new API feature environment, let's add a new API. To do so, we'll run amplify add API and add a GraphQL API.

[02:32] After the API has been added, we should be able to run amplify status and see two categories in our project. To initialize these features in our account, we can now run amplify push. After the resources have been created in our account, we should be able to run amplify status and see the two categories with the operation of no change.

[03:03] We can now check out our original environment to merge the new API feature. To do so, run amplify ENV checkout and the name of your environment. After checking out our original environment, we should be able to run amplify status and see a new category added to our environment.

[03:27] To create this new resource in our account, we can run amplify push. To remove the API feature development environment, we can now run amplify ENV remove API feature. This will also prompt us to ask us do we also want to remove all of the resources of the environment from the cloud. Choose yes to delete these resources in your account.

[04:13] When we now run amplify ENV list, we should see that the API feature environment has been removed.

egghead
egghead
~ a minute ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today