2. Setup
An AWS account is required for building and deploying on AWS. An account can be created here
Necessary tools
- A fully set-up development environment
- AWS CDK (Automatically pre-installed in the development environment)
Setting up the AWS CLI
In order for the AWS CLI to access our account, it must be configured.
In the first step, it makes sense to create a new user for the AWS CLI in order to be able to restrict the rights. The use of the admin account is not recommended.
The new user can be created in the Identity and Access Management (IAM) portal at AWS.
Add AdministratorAccess to the policies. This gives you full access to all resources. This is best for development purposes. Users in pipelines should never have AdministratorAccess!.
The user is now created. Now we need to create access keys for the AWS CLI. To do this, click on the user name to edit the user.
Open a terminal and enter the following command:
aws configure
Now enter the access key, then the secret access key, eu-central-1 and leave the last field empty.
The connection can be checked with the following command:
aws sts get-caller-identity
This completes the setup of the AWS CLI. Next, you can continue with the deployment of the application on AWS here.