AWS Authentication

Step-by-step guide on how to authenticate with AWS before launching the stack

πŸ“œ Prerequisite

Create an AWS sub-account (optional but recommended). This will both help monitor costs and be more secure, as it will not interfere with production or other workloads running in the existing AWS accounts.

πŸ› οΈ How to authenticate with AWS

STEP 1: Create an IAM policy

  1. Log into the AWS Management console, and search β€œiam” in the search box.

  1. You will be redirected to IAM dashboard. Click on "Policies" on the left side.

  2. Click on "Create Policy" on the left side.

  3. Switch to "JSON" in the next window.

  4. Put this policy in the JSON.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"cloudformation:*",
"ec2:*",
"iam:*",
"serverlessrepo:*",
"lambda:*",
"s3:*",
"eks:*",
"cloudwatch:*",
"kms:*",
"sns:*",
"dlm:*",
"sqs:*",
"cloudfront:*",
"autoscaling:*",
"events:*",
"apigateway:*",
"ssm:GetParameters",
"ecr:*"
],
"Resource": "*"
}
]
}
  1. Click on "Next: Tags", and add tags if you want.

  1. Click on "Next: Review".

  2. Give the policy a unique name, and provide a description.

  1. Click on "Create Policy".

STEP 2: Create an IAM user

  1. Log into the AWS Management console, and search β€œiam” in the search box.

  1. You will redirected to the IAM dashboard. Click on "Users" on the left side.

  1. Click on "Add User".

  2. Give the user a unique name, select the access types, enter or autogenerate the console password, select "Require password reset", and click on "Next: Permissions".

  1. Select Attach AWS existing policies directly.

  2. Search for and select the policy that you created earlier.

  1. Add tags to the user (optional), then click on "Review".

  1. Review the user details to check that everything is correct, then click on "Create User".

STEP 3: Log into AWS with your new credentials

You've successfully created a user, so now it's time to log in as this new user.

  1. Click the "Download .csv" to download your new access credentials.

  2. Click on the login URL in the green box at the top of the page.

  1. Log in with the username and password from your credentials.

You've now successfully logged in as a new user to the AWS Management Console!