---
# System prepended metadata

title: DevOps Training (AWS Create IAM user to Access AWS via Terraform)
tags: [Terraform, Devops, AWS]

---

# DevOps Training (AWS Create IAM user to Access AWS via Terraform)

###### tags: `Devops` `AWS` `Terraform`
### Terraform
```javascript=
What is  Terraform?
Allows you to automate and manage you infrastructure, your platform and services running on the platform.
Terraform is IaaS. Infrastructure as a service.
Terraform is a tool for provisioning the infrastruture.

Terraform vs Ansible:
Both IaaC Tools.
Terraform is mainly infrastrute tools and Ansible is a configuration Tools.
Ansible is more mature and Terraform is more new and advnace in orchestration.
So Terraform is better for infrastructure and ansible is better for configuraing the infrastucture.
```

### Open the AWS Console and Search the IAM and Select the IAM.

![](https://i.imgur.com/VM2wggM.png)

### Click on the USERS:

![](https://i.imgur.com/nIKF8Tj.png)

### Click on the Add User:

![](https://i.imgur.com/zQ9v4d7.png)


### Add the username, select the programmatic access and Click on Next

![](https://i.imgur.com/YsL7yvD.png)


### Create the Group to Provide Permission to that user.

![](https://i.imgur.com/ZnsBoNZ.png)


### Add the Group Name, Select the admin access to provide full access and click on create group

![](https://i.imgur.com/4vaDpGt.png)

### Now you can see the Group name and access permissions on the window, click next:tags:

![](https://i.imgur.com/AQm5SAC.png)

### It optional step if you want to do, I just skipp and click next: Review

![](https://i.imgur.com/DVsnngL.png)
 
 
### Just take a look all the things ok then next: create user

 ![](https://i.imgur.com/7BTlQT7.png)


### So the Terraform user is created, Donwload the CSV file which is really important:

![](https://i.imgur.com/aSapM2o.png)


### When you Download CSV file. Open the Power Shell and see the File in Downloads folder and see the content in the file. This is Very important.

![](https://i.imgur.com/9vZoPxR.jpg)


### Now configure the aws using the profile we created "Terraform"

![](https://i.imgur.com/aPnQGxW.png)

### Install the awscli for using Window PowerShell.

Download the file: 
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

![](https://i.imgur.com/VmaD0lh.png)

Open the PoweShell and Run the file: 
```javascript=
# PS:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
```
![](https://i.imgur.com/wxYPpJa.png)

![](https://i.imgur.com/DAMl3CJ.png)

```javascript=
# PS:\> aws --version
```

### configure the aws using PowerShell

![](https://i.imgur.com/o7vDMi4.jpg)

### Configuration Create 2 new files 1: config 2: Credentials

![](https://i.imgur.com/c6dbWG9.jpg)
