Socket
Socket
Sign inDemoInstall

cdk-iam-actions

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cdk-iam-actions

A Typescript library of AWS actions and condition key enums


Version published
Weekly downloads
190
decreased by-6.86%
Maintainers
1
Install size
1.01 MB
Created
Weekly downloads
 

Readme

Source

CDK IAM Actions

A generated library of constants for IAM policy actions and condition keys.

Usage

Install with NPM

npm install cdk-iam-actions

Then import and use whenever you need to build a PolicyStatement:

import { Policy, Effect } from "@aws-cdk/aws-iam";

import { actions, conditions } from "cdk-iam-actions"; // Import them all
import { S3 } from "cdk-iam-actions/lib/actions"; // Or just the one you need

new PolicyStatement({
  effect: Effect.ALLOW,
  actions: [actions.S3.PUT_OBJECT, S3.LIST_BUCKET],
  conditions: {
    [conditions.S3.PREFIX]: "my-prefix"
  },
  resources: ["*"]
});

Infrequently asked questions

Why are the enum members CAPITAL_SNAKE_CASE? TitleCase would've been prettier and closer to the actual action names!

JSII (Amazon's thing which lets you write Typescript and convert to C# / Java / Python) requires that enums are CAPITAL_SNAKE_CASE.

Why must import {S3} from cdk-iam-actions/lib/actions include 'lib'?

Because I didn't understand npm packaging until it was too late. Stay tuned for a 2.0 where you don't need to /lib.

Make??

¯\_(ツ)_/¯

Why is X missing?

Submit an issue!

Keywords

FAQs

Last updated on 03 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc