Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

cdk-iam-actions

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Issues
File Explorer

Advanced tools

cdk-iam-actions

A Typescript library of AWS actions and condition key enums

    1.0.0latest

Version published
Maintainers
1
Yearly downloads
3,161
increased by236.28%

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

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc