This plugin is a wrapper around the aws cli. It allows you to run aws commands from inside neovim. It assumes you have the aws cli version 2 installed. This plugin is still in its infancy and only supports a few commands.
- Install the plugin using your favorite plugin manager
- Ensure AWS CLI v2 is installed and configured with your credentials
- Open Neovim and run
:Aws - Select a service (e.g.,
ec2ors3) from the menu - Navigate using
j/kkeys and press<CR>to select items
Use your favorite plugin manager to install this plugin. For example, with lazy
return {
'zuzmuz/nvimawscli',
config = true,
}Add the following to your init.lua if you’re using any other way of installing the plugin
require('nvimawscli').setup()You might want to set the equalalways option to false when setting up the plugin, the default of equalalways is true. This will lead to windows to resize every time a new window is opened or closed.
vim.opt.equalalways = falseBefore using this plugin, ensure you have:
- AWS CLI v2 installed on your system
- AWS credentials configured (run
aws configureor set up your credentials file) - Neovim with the plugin installed and configured
Run the following command in Neovim to open the AWS dashboard:
:Aws
The plugin uses a menu-based interface:
- Main Menu: When you first launch
:Aws, you’ll see a list of available AWS services- Use standard Vim navigation keys (
j=/=kor arrow keys) to move between services - Press
<CR>(Enter) to select a service - Preferred services can be configured to appear at the top
- Use standard Vim navigation keys (
- Service Menu: After selecting a service, you’ll see available actions
- Navigate through the action list
- Press
<CR>(Enter) to execute an action
- Resource View: Actions will display resources (instances, buckets, etc.)
- Select resources to view details or perform operations
- Available operations depend on the selected resource type
You can customize the plugin behavior by passing options during setup:
To open a specific service automatically when launching :Aws:
return {
'zuzmuz/nvimawscli',
opts = {
startup_service = 'ec2.instances'
}
}Configure which services appear at the top of the main menu:
require('nvimawscli').setup({
preferred_services = {'ec2', 's3'}
})Select ec2 from the main menu to manage your EC2 instances.
- List Instances: View all your launched EC2 instances
- Instance Details: Select an instance to view its general details and status
- Start/Stop Instances: Control instance state directly from Neovim
- Monitoring: View basic instance monitoring metrics
- SSH Connection: Connect to instances via SSH
To use the SSH connection feature:
- Ensure the SSH private key file is in the current directory where Neovim is launched
- The key filename must match the key name specified in the instance details
- The public key must be present in the instance’s
~/.ssh/authorized_keys
Note: If the key name in instance details doesn’t match your local key file, or if the public key has been manually removed from the instance, automatic SSH connection will not work.
- Launch
:Awsand select ec2 - Choose List Instances to see all instances
- Navigate to an instance and press
<CR>to view details - From the instance details view, you can:
- Start or stop the instance
- View monitoring data
- Initiate an SSH connection
Select s3 from the main menu to manage your S3 buckets and objects.
- List Buckets: View all your S3 buckets
- Browse Objects: Navigate through objects in a selected bucket (displays up to 1000 objects)
- Download Objects: Download files from S3 to your local machine
- Delete Objects: Remove objects from your buckets
- Launch
:Awsand select s3 - Choose List Buckets to see all available buckets
- Select a bucket to view its contents
- Navigate to an object and choose an action:
- Download the object to your local system
- Delete the object from the bucket
Note: Object listing is currently limited to the first 1000 objects in a bucket.
The plugin currently only supports viewing ec2 instances as well as being able to start/stop and connect to them. Its goal is to have good coverage of the most common aws commands like elb, s3, rds, codebuild, codedeploy, cloudwatch, etc.