# AWS CLI & S3

#### Installing AWS CLI

```
pip2 install awscli
    aws configure
        1. AWS Access Key ID
        2. AWS Secret Access Key
        3. Default region name
        4. Default output format
```

The above mentioned details can be generated from the aws console and then cli access can be configured.

#### AWS CLI S3 Commands

```
## CLI COMMANDS : 
1.  Listing Bucket contents : 
    aws s3 ls s3://[Bucket Name]
2. Moving data into the S3 bucket:
    aws s3 mv Hack.txt s3://[Bucker Name]
3. Removing data from the bucket:  
    aws s3 rm s3://[Bucket Name]/Hack.txt
```

### Other CLI Based commands & usage

```
List of S3 buckets: aws s3api list-buckets --query "Buckets[].Name
User Policies: aws iam list-user-policies
Role Policies: aws iam list-role-policies
Group policies: aws iam list-group-policies
Create user: aws iam create-user
```
