Skip to content

joshheyse/aws-policies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws_policies

Type safe AWS policy actions for all services.

Usage

import * as policies from 'aws-policies';
import * as cdk from '@aws-cdk/core';
import * as iam from '@aws-cdk/aws-iam';
import * as s3 from '@aws-cdk/aws-s3';

export class VpcStack extends cdk.Stack {

  constructor(construct: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(construct, id, props);

    const bucket = new s3.Bucket(this, 'Bucket', {
      bucketName: 'MyBucket'
    });

    bucket.addToResourcePolicy(new iam.PolicyStatement({
      actions: [
        policies.s3.ListJobs // 's3:ListJobs'
      ]
    }));
  }
}

About

Typesafe AWS policy actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published