Skip to content

towardsthecloud/vscode-iam-service-principal-snippets

Repository files navigation

AWS IAM Service Principal Snippets for VS Code

Installs Rating

This VS Code extension provides autocompletion of all AWS services that can be used as Service Principals in your IAM policies.

Tip

Towards the Cloud runs the AWS foundation for modern product teams. This means your team ships faster, slashes AWS spend, and stay audit-ready without having to hire a platform squad.

Unsure where to start? Book a free AWS Account Review. We’ll analyse your AWS environment, hand you a security & cost report, and you decide whether to act on it yourself or have us execute. No pressure, no retainer required up front.

Book a Free AWS Account Review

☁️ See how we turn AWS chaos into a compliant, cost-efficient platform…

The problem: AWS complexity compounds fast

Ad‑hoc builds become 40–60% overspend, unmonitored security gaps put customer data at risk, and engineers burn out running infrastructure instead of shipping products.

Our managed foundation keeps you moving forward

  • Compliant Landing ZoneMulti-account AWS CDK deployment with 100% CIS benchmark coverage, centralized logging, and SSO-ready access control.
  • Production-ready CDK components – Pre-hardened building blocks so teams launch new services without reinventing best practices.
  • CI/CD with safe rollbacks – GitOps workflows and governed pipelines that let you release faster with confidence.
  • Quarterly cost & security reviewsCost Optimisation plus Security Reviews delivered proactively.
  • Fractional Cloud Engineer – On-demand expertise from an architect who implemented enterprise-grade AWS infrastructure for over a decade.

Outcomes our customers see

  • 30%+ lower AWS bill – Continuous oversight prevents expensive drift (30–60% documented savings).
  • SOC 2 / HIPAA acceleration – Guardrails, logging, and evidence packs ready on day one.
  • Audit-ready every quarter – Automated monitoring plus recurring reviews keep findings under control.
  • Faster product velocity – Engineers build features, not managing infrastructure.
  • Headcount leverage – A flexible retainer replaces the cost of a full-time platform team.

Proof: Y Combinator startup Accolade used our Landing Zone to earn SOC 2 in record time:

“We achieved a perfect security score in days, not months.” — Galen Simmons, CEO

Ready to see where your AWS account stands? Grab a spot while they’re available:

Book a Free AWS Account Review


Features

  1. Auto-completion for AWS Service Principals: Provides intelligent auto-completion suggestions for AWS Service Principals when defining IAM policies or roles.
  2. Context-aware Suggestions: The extension intelligently detects when you're working with IAM policies or roles and only suggests Service Principal completions in relevant contexts.
  3. Supports Multiple Languages: Supports auto-completion for Service Principals in JSON, YAML, Terraform, and AWS CDK (TypeScript, and Python).

Usage

  1. Install the "AWS IAM Service Principal Snippets" extension in VS Code.
  2. Open or create a new file (.json, .yml, .tf, .ts, or .py) where you're defining IAM policies or roles.
  3. When you reach a point where you need to specify a Service Principal (e.g., Principal key in JSON/YAML policies, assumed_by parameter in Python roles, etc.), start typing the name of the AWS service.
  4. The extension will provide auto-completion suggestions for matching AWS Service Principals.
  5. Select the desired Service Principal to insert it into your code.

Example of auto-completion in action:

IAM Service Principal Snippets Autocomplete Example

Note: If auto-completion doesn't trigger automatically, press Ctrl+Space (or Cmd+Space on macOS) to manually invoke IntelliSense.


Support

If you have a feature request or an issue, please let me know on Github

Author

Danny Steenman

Sponsor this project