# Cloudlens

![](https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FFbJLcbH0I7iMzfhtxUGg%2Fcloudlens.png?alt=media\&token=38bffb42-50c2-4d4c-a656-188f0189dd50)

## Terminal-ate Your Cloud Worries!

AWS and GCP Console in your terminal! well, almost. Explore AWS and GCP services like EC2, S3, IAM, VPC, VM, Storage etc. from your terminal. If you like k9s for Kubernetes, you'll love cloudlens.

### Got 2 minutes? Check out a video overview of cloudlens:

{% embed url="<https://drive.google.com/file/d/1Nc-b4g8F9F7V1ARi6LFo0vglbqKLOGZQ/view?usp=share_link>" %}

### Getting set up

<details>

<summary>Install</summary>

```
brew install one2nc/cloudlens/cloudlens
```

</details>

<details>

<summary>Run</summary>

```
cloudlens
```

</details>

### AWS Features

| Services                          | Description                                                           | Alias   |
| --------------------------------- | --------------------------------------------------------------------- | ------- |
| [S3](#s3)                         | View all S3 buckets and their contents                                | `s3`    |
| [EC2](#ec2)                       | view all instances and their associated metadata, including JSON data | `ec2`   |
| [EC2 Snapshot](#ec2-snapshot)     | view a list of all EC2 snapshots                                      | `ec2:s` |
| [EC2 Image](#ec2-image)           | See a list of all EC2 images                                          | `ec2:i` |
| [ECS Clusters](#ecs-clusters)     | View all ECS Clusters                                                 | `ecs:c` |
| [VPC](#vpc)                       | view all VPC's and their associated metadata, including JSON data     | `vpc`   |
| [Security Group](#security-group) | Security Groups and their associated metadata                         | `sg`    |
| [IAM users](#iam-users)           | view all IAM users and their associated metadata                      | `iam:u` |
| [IAM Groups](#iam-group)          | view all IAM users groups                                             | `iam:g` |
| [IAM Roles](#iam-roles)           | view all IAM Roles                                                    | `iam:r` |
| [EBS](#ebs)                       | View all available EBS volumes                                        | `ebs`   |
| [SQS](#sqs)                       | view a list of all SQS queues                                         | `sqs`   |
| [Lambda](#lambda)                 | view a list of all Lambda functions                                   | `lamda` |

### GCP Features

| Services                    | Description                                                           | Alias     |
| --------------------------- | --------------------------------------------------------------------- | --------- |
| [Storage](#storage)         | View all storage buckets and their contents                           | `storage` |
| [VM](#vm)                   | view all instances and their associated metadata, including JSON data | `vm`      |
| [VM Snapshot](#vm-snapshot) | view a list of all VM snapshots                                       | `vm:S`    |
| [VM Image](#vm-image)       | See a list of all VM images                                           | `vm:I`    |
| [Disk](#disk)               | View all available disks                                              | `disk`    |

### Prompt

To view the input prompt, press the : key. From there, you can try different commands to access and view various services.You can use the tab key or the right arrow key for autocomplete to make entering commands faster and easier.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FIZvDBkAlhub420ch2mEU%2Fimage.png?alt=media&#x26;token=356a305d-f3f9-41ba-bb9a-e7f467b05c00" alt="Prompt"><figcaption><p>Prompt</p></figcaption></figure>

### Help

To access the Help Page, press the "?" key while on the prompt. This will display all available commands and services for you to view.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2F4urOZNBY15rOt8EgcAJM%2Fimage.png?alt=media&#x26;token=3d452477-0193-47ad-a266-19df0dbdc4ea" alt="Help Page"><figcaption><p>Help Page</p></figcaption></figure>

### Resources Tab

The resources window located in the top right corner of the terminal provides you with all the necessary commands to browse for a specific service.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FaZ3rzzQltmPOSX91XxJ3%2Fimage.png?alt=media&#x26;token=e55c1667-8ad5-41c0-a738-37b2f7b42339" alt="Resources Tab"><figcaption><p>Resources Tab</p></figcaption></figure>

### Dropdowns

You can switch between the dropdown options using the tab button.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FYVCiL3F9k65w53CUqBec%2Fimage.png?alt=media&#x26;token=c01c92c1-1519-412b-b77c-f96b31ea3c44" alt="Dropdowns"><figcaption><p>Dropdowns</p></figcaption></figure>

## AWS Resources

### S3

To view the <mark style="color:orange;">S3</mark> page, use the command `s3` in your prompt. Pressing enter will display all the available buckets, folders, and files. You can use the escape key to go back to the previous page.. Additionally, you can download a CSV file using the `z` command.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FCmxc5aZSxlCWULR9hRp8%2Fimage.png?alt=media&#x26;token=3f4202d1-6198-4156-a53b-077e4bc8f110" alt="S3 Page"><figcaption><p>S3 Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FyAs69iFC0j9g39YeJB2r%2Fimage.png?alt=media&#x26;token=1b2962ab-2176-4265-aa5e-fb72da4f5f32" alt="S3 Details Page"><figcaption><p>S3 Details Page</p></figcaption></figure>

### EC2

To view the <mark style="color:purple;">EC2</mark> page, enter the command `ec2` in your prompt. Pressing enter will display all available instances. To view specific details about an instance, select it and press enter to display a JSON with the EC2 information. You can use the escape key to navigate back to the previous page. Additionally, you can download a CSV file by using the `z` command.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FNNjNQw64sBQdxDU8jrmm%2Fimage.png?alt=media&#x26;token=1eca5fcc-37e6-42ac-a236-aa3da457e101" alt="EC2 Page"><figcaption><p>EC2 Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FIvHXzaFDMn7VC3zBXeX6%2Fimage.png?alt=media&#x26;token=579880f4-a6f4-458c-8c31-a0168df25209" alt="EC2 Details Page"><figcaption><p>EC2 Details Page</p></figcaption></figure>

### EC2 Snapshot

To access the <mark style="color:blue;">EC2 snapshots</mark> page, enter `ec2:s` in your prompt and press Enter. This will display a list of all available snapshots. Select a snapshot to view its details, then press Enter again. To return to the previous page, press the Escape key.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FsRs6OGk2usP5uSmmzx8k%2Fimage.png?alt=media&#x26;token=609ec1a9-313b-432c-8267-c438cb577a36" alt="EC2 Snapshot Page"><figcaption><p>EC2 Snapshot Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Flxbk7Ny48hHTX64UtoeS%2Fimage.png?alt=media&#x26;token=e0e723b9-c319-418d-bb6a-5d26310d5084" alt="EC2 Snapshot Details Page"><figcaption><p>EC2 Snapshot Details Page</p></figcaption></figure>

### EC2 Image

To access the <mark style="color:blue;">EC2 image</mark> page, enter `ec2:i` in your prompt and press Enter. This will display a list of all available images. Select an image to view its details, then press Enter again. To return to the previous page, press the Escape key.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FC2waElTpGbEPbrl5pTEP%2Fimage.png?alt=media&#x26;token=2343e762-502f-4462-87b0-63d6f5b9239f" alt="EC2 Image Page"><figcaption><p>EC2 Image Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FiklN7yPLgNG0fbFrPtTj%2Fimage.png?alt=media&#x26;token=3a680437-8d23-4c1d-af5d-6c702155a12f" alt="EC2 Image Details Page"><figcaption><p>EC2 Image Details Page</p></figcaption></figure>

### ECS Clusters

To acess the <mark style="color:blue;">ECS Clusters</mark> page, enter `ecs:c` in your prompt and press Enter. This will display a list of all deployed Clusetrs.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-80a58c72575a95d1b94e404684d0ccb233f89497%2Fecs-cluster.png?alt=media" alt="ECS Cluster Page"><figcaption><p>ECS Cluster Page</p></figcaption></figure>

From the ECS cluster page, you can navigate down through various layers:

* **Clusters**: Get an overview of available clusters.
* **Services**: Explore services associated with each cluster.
* **Tasks**: View individual tasks running within these services.
* **Containers**: Access detailed information about specific containers.

### VPC

To access the <mark style="color:green;">VPC</mark> management functionality, type `vpc` in the command prompt to display a list of available VPCs. Selecting a specific VPC and pressing enter will show a JSON file with its information. You can view the VPC's subnets by using the `s` command and navigate back to the previous page by pressing the escape key. Additionally, you can download a CSV file using the `z` command.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FBORaWobwMabCePuKwx7Y%2Fimage.png?alt=media&#x26;token=6f7ffe37-b4d8-459c-a3ea-ec5be87b8575" alt="VPC Page"><figcaption><p>VPC Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FKOqSlLktvrfFc6V4UcqX%2Fimage.png?alt=media&#x26;token=af9bcbcd-8004-478a-aca5-e501b1ffe751" alt="VPC Details Page"><figcaption><p>VPC Details Page</p></figcaption></figure>

### Security Group

To access the <mark style="color:blue;">security group</mark> management functionality, enter `sg` in the command prompt to display a list of available security groups. Selecting a specific security group and pressing enter will display a JSON file with its information. To go back to the previous page, press the escape key. You can also download a CSV file using the `z` command.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2F2nCYXNBaLFTDH1rjqQbm%2Fimage.png?alt=media&#x26;token=47a9d593-7b97-4c94-8faa-a0a7f5959dcf" alt="Security Group Page"><figcaption><p>Security Group Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2F9FkzJxd5XnUmH36dzaRe%2Fimage.png?alt=media&#x26;token=856d8bc7-5b1d-456f-b76b-bca59f64013b" alt="Security Group Details Page"><figcaption><p>Security Group Details Page</p></figcaption></figure>

### IAM Users

To view <mark style="color:yellow;">IAM users</mark>, enter `iam:u` in the command prompt to display a list of users. Selecting a specific user and pressing `Shift+P` will display their policy. To go back to the previous page, press the escape key. You can also download a CSV file using the `z` command.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2F9NBlVbo1NehefNyPwTNW%2Fimage.png?alt=media&#x26;token=d914d8a5-7401-4665-8059-fe7746ce3a69" alt="IAM Users"><figcaption><p>IAM Users</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2F5gQT0rmRNHB8MZWorYrN%2Fimage.png?alt=media&#x26;token=0dcc12c7-fb26-4cd7-9063-02f609f34a86" alt="IAM User Policy"><figcaption><p>IAM User Policy</p></figcaption></figure>

### IAM Group

To view <mark style="color:purple;">IAM groups</mark>, enter `iam:g` in the command prompt to display a list of groups. Selecting a specific group and pressing Shift+P will display its users. To go back to the previous page, press the escape key. You can also download a CSV file using the `z` command.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FQYD6KZhwAREJoTBLChdH%2Fimage.png?alt=media&#x26;token=0160f969-71d2-4e4b-b4d4-eff0a0867264" alt="IAM Group"><figcaption><p>IAM Group</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FrxDywWZHVKZLZOLveOvU%2Fimage.png?alt=media&#x26;token=ec1272c6-3449-4c2d-8e09-c11edf9be20e" alt="Group Policy"><figcaption><p>Group Policy</p></figcaption></figure>

### IAM Roles

To view <mark style="color:purple;">IAM roles</mark>, enter `iam:r` in the command prompt and press Enter to display a list of user roles. To view the policy of a specific role, select the role and press `Shift+P`. To return to the previous page, press the Escape key. To download a CSV file, use the `z` command

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FBto9xAlS4NBDWCRMH3e8%2Fimage.png?alt=media&#x26;token=e2171998-91df-4fce-9903-3e1af0f38d92" alt="IAM Role Page"><figcaption><p>IAM Role Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FIhZcaZIwEkWzvJ42pmhU%2Fimage.png?alt=media&#x26;token=267eb0d3-6366-4f97-95f1-5990d0b1e9c6" alt="IAM Role Policy Page"><figcaption><p>IAM Role Policy Page</p></figcaption></figure>

### EBS

To view <mark style="color:green;">EBS volumes</mark>, enter `ebs` in the command prompt and press Enter to show a list of volumes. Select a volume and press Enter to view its details. To return to the previous page, press the Escape key.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FcJzkuMcluDZZmbiVFUJQ%2Fimage.png?alt=media&#x26;token=bb5b831e-dad0-4751-ae45-2660fd965d7c" alt="EBS Page"><figcaption><p>EBS Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2F75VZ48FV5UkaASs8iygc%2Fimage.png?alt=media&#x26;token=07ee8075-1c82-4552-bbaa-ddc7fa1dd583" alt="EBS Details Page"><figcaption><p>EBS Details Page</p></figcaption></figure>

### SQS

To view <mark style="color:orange;">SQS queues</mark>, enter `sqs` in the command prompt and press Enter to display a list of queues. Select a queue and press Enter to view its details. To go back to the previous page, press the Escape key.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FRhf7JMzLp5hNBWq3w0EB%2Fimage.png?alt=media&#x26;token=e7f84a16-51ce-4950-a411-779a106ab8da" alt="SQS Page"><figcaption><p>SQS Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FgZwpdohmqtv94wHPoe2f%2Fimage.png?alt=media&#x26;token=84b7462a-ed2d-41fb-a1e7-378ee31e0a9d" alt="SQS Details Page"><figcaption><p>SQS Details Page</p></figcaption></figure>

### Lambda

View all your Lambda functions easily by entering 'lambda' command in your terminal prompt.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2FWeTJJpDP2jhnIHACfav9%2Fimage.png?alt=media&#x26;token=e9424227-bdcd-4475-a6e0-bf67d45a0b51" alt=""><figcaption></figcaption></figure>

## GCP Resources

### Storage

To view the <mark style="color:orange;">Storage buckets</mark> page, use the command `storage` in your prompt. Pressing enter will display all the available buckets, folders, and files. You can use the escape key to go back to the previous page.. Additionally, you can download a CSV file using the `z` command.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-9df634d7b790faa20f174aa0bcacdd7475681141%2Fgcp_storage.png?alt=media" alt="S3 Page"><figcaption><p>Storage Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-be072d5dd33704166660b20ba33fa42164d81688%2Fgcp_storage_details.png?alt=media" alt="Storage Details Page"><figcaption><p>Storage Details Page</p></figcaption></figure>

### VM

To view the <mark style="color:purple;">VM</mark> page, enter the command `vm` in your prompt. Pressing enter will display all available instances. To view specific details about an instance, select it and press enter to display a JSON with the VM information. You can use the escape key to navigate back to the previous page. Additionally, you can download a CSV file by using the `z` command.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-9cc7b43c27244964a36915c933b72189394a51c6%2Fgcp_vm.png?alt=media" alt="VM Page"><figcaption><p>VM Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-da5e886c5a03b76cbbdd9589d41479e5a8093177%2Fgcp_vm_details.png?alt=media" alt="VM Details Page"><figcaption><p>VM Details Page</p></figcaption></figure>

### VM Snapshot

To access the <mark style="color:blue;">VM snapshots</mark> page, enter `vm:S` in your prompt and press Enter. This will display a list of all available snapshots. Select a snapshot to view its details, then press Enter again. To return to the previous page, press the Escape key.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-e9ff14f59279eff43310000d9c769ad52cf525bc%2Fgcp_vm_snapshots.png?alt=media" alt="VM Snapshot Page"><figcaption><p>VM Snapshot Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-4e9a8ff8d956bc283fdaadf1195e11f6f5481356%2Fgcp_snapshot_details.png?alt=media" alt="VM Snapshot Details Page"><figcaption><p>VM Snapshot Details Page</p></figcaption></figure>

### VM Image

To access the <mark style="color:blue;">VM image</mark> page, enter `vm:I` in your prompt and press Enter. This will display a list of all available images. Select an image to view its details, then press Enter again. To return to the previous page, press the Escape key.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-a0eebbde8e849a359ba563aa1cfc239d77d993fa%2Fgcp_vm_images.png?alt=media" alt="VM Image Page"><figcaption><p>VM Image Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-82148f8d2d207c8eb48288f65523923dc65d6677%2Fgcp_image_details.png?alt=media" alt="VM Image Details Page"><figcaption><p>VM Image Details Page</p></figcaption></figure>

### Disk

To view <mark style="color:green;">Disks</mark>, enter `disk` in the command prompt and press Enter to show a list of disks. Select a disk and press Enter to view its details. To return to the previous page, press the Escape key.

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-3de36cfb4a57fa2114bf8a6b6dfb7534be8ad433%2Fgcp_disks.png?alt=media" alt="Disk Page"><figcaption><p>Disk Page</p></figcaption></figure>

<figure><img src="https://91666674-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRQoc4unaizST1M7van9Q%2Fuploads%2Fgit-blob-6cea219070acac3fc3117046eb3efb630d20dbff%2Fgcp_disks_details.png?alt=media" alt="Disk Details Page"><figcaption><p>Disk Details Page</p></figcaption></figure>
