What you’ll learn
- how to deploy your Webiny project using different AWS profiles
AWS profiles enable you to store multiple AWS credentials on your system, and then, when the time comes, to use specific credentials in order to perform a command against the AWS cloud.
Read more about profiles and how to set them up in the official AWS documentation article.
A different profile can be specified via the
AWS_PROFILE environment variable, which you can set in a couple of ways.
The easiest way to do it would be using the
.env file, located in your project root, for example:
The advantage of this approach is that you don't need to set the
AWS_PROFILE via your terminal, but it always stays in the
.env file, which is automatically loaded when executing mentioned deployment-related commands.
Apart from setting it via the shown
.env file, the
AWS_PROFILE environment variable can also be set using a terminal of your choice, and a command that's available on your operating system.
For example, on Linux or MacOS, you can use the
AWS_PROFILE has been properly set via one of the shown methods, you can proceed with the deployment of your Webiny project.
If you have the AWS CLI installed on your system, in your terminal, you can run the following command:
This should give an output similar to the following: