---
type: archive
area: archive
status: archived
date: 2026-05-03
created: 2026-05-03
updated: 1980-01-01
tags:
  - archive
---
TO configure aws cli

``` bash
aws configure
```

Syntax of using cli

``` bash
aws <command> <subcommand> [options and parameters]
```

#### Creating resources with terraform
Example
![[img-20240919-163333-0a764170.png]]
we should add a provider block. In it we store some important infos
![[img-20240919-163520-52d9ea15.png]]
- Creating credentials like that is not god they are exposed 
- to fix that we can move credentials to cli tool by configuring it 
- or using env variables
#### Policy iam with terraform
![[img-20240919-165004-9ac5d251.png]]
here we create the policy
or we can do that
![[img-20240919-165213-a93de8aa.png]]
and write the policy in a json file
![[img-20240919-165242-f807d980.png]]
Now we should map it to a user by that
![[img-20240919-165120-ca6836a6.png]]
#### S3 with terraform
- Creating a bucket
![[img-20240919-222549-207c15f5.png]]
- uploading a file to bucket
![[img-20240919-222622-0fe32b1b.png]]
- Define a bucket policy
 ![[img-20240919-223142-aec01f96.png]]
 

