npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aws-iam-language-server

v0.0.23

Published

This is a language server that provides a better DX for writing IAM policies.

Downloads

1,488

Readme

AWS IAM Policy Language Server

This is a language server that provides a better DX for writing IAM policies.

It supports policies written in

  • YAML
  • JSON
  • CloudFormation/SAM (YAML or JSON)
  • HCL (jsonencode objects or statement blocks)

Installation

Visual Studio Code

Install the extension.

Config

{
  // replace ${DIAGNOSTIC_RULE} with a diganostic rule id, like DEPENDENT_ACTION
  "aws-iam-language-server.diagnostics.${DIAGNOSTIC_RULE}.enabled": true
}

Neovim, etc

You can install the language server globally with npm:

npm install -g aws-iam-language-server

And then you can set your editor up, for instance if you're running Neovim:

vim.lsp.config("aws-iam-language-server", {
  cmd = { "aws-iam-language-server", "--stdio" },
  filetypes = { "yaml", "yaml.cloudformation", "json", "json.cloudformation", "terraform", "tofu" },
  root_markers = { ".git" },
  -- optional, only if you want to override the defaults
  settings = {
    ["aws-iam-language-server"] = {
      diagnostics = {
        -- replace ${DIAGNOSTIC_RULE} with a diganostic rule id, like DEPENDENT_ACTION
        ${DIAGNOSTIC_RULE} = { enabled = false },
      },
    },
  },
})

vim.lsp.enable("aws-iam-language-server")

Features

This language server will detect policies within yaml/json documents, including deeply-nested policies. This means it will work for polcies defined as CloudFormation resources or plain policy files. Detection of a policy does require that you have a Version set to a valid version date: 2012-10-17 or 2008-10-17).

DocumentLink

Certain elements within a policy document will have a document link associated with it.

Actions:

  • IAM Actions reference
  • API operation

Completion

This language server provides completion on:

  • statement keys (Effect, Action, Resource, etc)
  • effect values (Allow/Deny)
  • principal types (AWS, Federated, *, etc)
  • principal type values (service principals, aws arns, etc)
  • IAM actions
  • resources (progressive arn component suggestions, full arn completions for action-specific arns)
  • condition operators (StringLike, ForAnyValue:*, etc)
  • condition keys (global keys like aws:RequestTag/${TagKey}, action-specific keys like s3:TlsVersion)

Hover

Hovering over elements within a policy document will show contextual documentation:

  • actions (access level, resource types, condition keys, and dependent actions)
  • resources (matched resource type from the service reference with ARN format and condition keys)
  • principal types (description of AWS, Service, Federated, CanonicalUser)
  • principal values (identifies account IDs, role/user ARNs, service principals, federated providers)
  • condition operators (description of what each operator does, like StringEquals, ArnLike, IpAddress, etc.)
  • condition keys (documentation for global keys like aws:SourceIp and service-specific keys like s3:prefix)

Diagnostics

This language server will provide diagnostics for some IAM policy issues, including:

  • no extra policy document keys are specified
  • no missing keys in a statement, (effect, action, resource or effect, action, principal)
  • no duplicate keys in a statement (including "not" variants like action/not action)
  • ensuring Sid uniqueness within a policy document
  • Sid values are valid (alphanumeric for identity policies, allow spaces in resource policies)
  • effect has a valid value
  • defined actions are valid, or wildcards resolve to valid actions
  • arn parts are valid (partition, region, account id)
  • dependent actions (ecs:RunTask requires iam:PassRole)