Skip to content

How to generate credentials in AWS?

To access AWS, you generate credentials using Identity and Access Management (IAM).

The credentials in AWS include ONE access key and ONE secret access key. And they can be created either by the ROOT user or a IAM user.

Root user credentials (fast)

The fastest way to generate credentials in AWS services is through the root user, though it is not recommended for everyday use due to security concerns.

WARNING

The root user has unrestricted access to all AWS resources and services, which makes it a powerful but risky option if compromised. Therefore, AWS strongly advises using the root user only for account setup and performing tasks that cannot be done by IAM users or roles.

  1. First go to the IAM console after logging in

AWS IAM Search

  1. Once you're in the dashboard go to "My security credentials" link

AWS IAM Dashboard

  1. Scroll down to access keys section an click on "Create access key"

AWS IAM Dashboard create

  1. Ignore the danger, select the checkbox and click on "Create access key"

AWS IAM Dashboard create confirm

  1. Copy both the "access key" and "secret access key" before leaving the page

AWS IAM Dashboard copy keys

IAM user credentials (safe)

The safest way to generate credentials in AWS services is through a IAM user, since the have limited access to the AWS account and then their credentials are not as risky to lose.

TIP

The easiest way to grant access to a IAM user that will control all available resources on the AWS account is through the AdministratorAccess policy which restricts critical operations like changing billing or accounts.

  1. First go to the IAM console after logging in

AWS IAM Search

  1. Go to the users console using the link on the leftside menu

AWS IAM Dashboard select users

  1. Create a new IAM user for administration

AWS IAM Dashboard users

  1. Provide a name and password for the new user, click "next"

AWS IAM Dashboard create user 1AWS IAM Dashboard create user 2

  1. Attach the "AdministratorAccess" policy to new user, click "next"

INFO

This policy grants full access to all AWS resources and services. If you assign this policy to the user, they can perform any action on any AWS service without restrictions.

AWS IAM Dashboard user permission 1AWS IAM Dashboard user permission 2

  1. Review final details and confirm operation

AWS IAM Dashboard user review

  1. Return to users list and click in the new user

AWS IAM Dashboard user list

  1. Go to "security credentials" tab on new user details and click on "create access key"

AWS IAM Dashboard user detauls 1AWS IAM Dashboard user detauls 2

  1. Choose the "Command Line Interface" option, select the checkbox and click "next"

AWS IAM Dashboard create key 1AWS IAM Dashboard create key 2

  1. Add a description tag to the new credentials to identify them easily, confirm operation

AWS IAM Dashboard key detail

  1. Copy both the "access key" and "secret access key" before leaving the page

AWS IAM Dashboard copy key

Add secrets to CloudStudio

INFO

In case you have the AWS CLI installed and configured (with the same credentials extrated with the process above), then it's not necesary to load them on the environment secrets of CloudStudio

  1. Go to the Aws provider on the CloudStudio dashboard and click "add secret"

CloudStudio add keys 1

  1. Copy the 2 keys, paste it on the access_key and secret_key values and apply changes

CloudStudio add keys 2

  1. Finally set created secret to the current app environment

CloudStudio add keys 3

Released under a Personal use License.