[AWS] Create New User and Generate Access Keys
Hi. In this post, I'll show you a walkthrough of how to create a new user in your AWS and also generate its access keys so that it can be used on CLI.
Steps:
- Open `https://aws.amazon.com/console/`. On the header, click on `Sign in to the Console` button.
- Under 'Sign In' page, click either 'Root user' or 'IAM user'. Enter your email and password and click 'Sign In'
- Under 'Console Home', click on 'IAM'. If you can't find it here, use the Search tool or press 'Alt+S' to enter your inputs.
- On the 'Identity and Access Management' page, on left-side pane, click and expand 'Access Management'. Under this, click on 'Users'.
- Under 'Users' page, click on 'Add Users' button.
- The 'Add Users' procedure consists of 3 steps, namely: Specify user details, Set permissions, and Review and Create.
- Under 'Specify user details', enter a meaningful user name. Click on 'Next' button.
- Under 'Set Permissions' step, select 'Add user to group'. Under 'User Groups', select 'Create group'.
- Under 'Create user group' pop up, enter a meaningful name to identify this group. Next, under 'Permission Policies' select a policy according to your project's need and then click on 'Create user group'. For now, let's select 'AdministratorAccess-Amplify' for an example.
- Under 'User Groups', select the user group you have just created and click 'Next'.
- Under 'Review and Create' page, review all the entered details and click 'Create user'.
Until here you have seen how to create a new user. After this, you will see how to generate access key.
- Under the list of all users, click on the username you had just created.
- A 'Summary' page opens for that user. Here, you will see different tabs under the summary: Permissions, Groups, Tags, etc.
- Click on 'Security credentials' tab. Scroll down to 'Access keys' section and click on 'Create access key'.
- Creation of access key consists of 3 steps, namely: Access key best practices and alternatives, Set description tag and Retrieve access keys.
- Under 'Access key best practices and alternatives', select the use case which best fits your project needs and click on 'Next'.
- The 'Set description tag' is optional but you can use this step to describe the purpose of this access key. Next, click 'Create access'
- Under 'Retrieve access keys'. either you can copy access key and secret access key values or download a '.csv' file. and click 'Done'.
Here are some best practices to remember for Access keys:
- Never store your access key in plain text, in a code repository, or in code.
- Disable or delete access key when no longer needed.
- Enable least-privilege permissions.
- Rotate access keys regularly.
Comments
Post a Comment