Socket
Socket
Sign inDemoInstall

@aws-cdk/aws-iam

Package Overview
Dependencies
10
Maintainers
4
Versions
288
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aws-cdk/aws-iam

CDK routines for easily assigning correct and minimal IAM permissions


Version published
Weekly downloads
223K
increased by20.22%
Maintainers
4
Install size
1.68 MB
Created
Weekly downloads
 

Changelog

Source

0.8.1 - 2018-08-08

Features

  • aws-cdk: Support --profile in command-line toolkit ([@rix0rrr] in #517)
  • @aws-cdk/cdk: Introduce Default construct id ([@rix0rrr] in #496)
  • @aws-cdk/aws-lambda: Add LambdaRuntime.DotNetCore21 ([@Mortifera] in #507)
  • @aws-cdk/runtime-values (BREAKING): rename 'rtv' to 'runtime-values' ([@rix0rrr] in #494)
  • @aws-cdk/aws-ec2: Combine Connections and DefaultConnections classes ([@rix0rrr] in #453)
  • @aws-cdk/aws-codebuild: allow buildSpec parameter to take a filename ([@rix0rrr] in #470)
  • @aws-cdk/aws-cloudformation-codepipeline: add support for CloudFormation CodePipeline actions ([@mindstorms6] and [@rix0rrr] in #525).
  • docs: Improvements to Getting Started ([@eladb] in #462)
  • docs: Updates to README ([@Doug-AWS] in #456)
  • docs: Upgraded jsii-pacmak to 0.6.4, which includes "language-native" type names and package coordinates ([@RomainMuller] in awslabs/jsii#130)

Bug fixes

  • aws-cdk (toolkit): Fix java cdk init template ([@RomainMuller] in #490)
  • @aws-cdk/cdk (BREAKING): Align FnJoin signature to CloudFormation ([@RomainMuller] in #516)
  • @aws-cdk/aws-cloudfront: Fix origin error ([@mindstorms6] in #514)
  • @aws-cdk/aws-lambda: Invalid cast for inline LambdaRuntime members in Java ([@eladb] in #505)
  • examples: Fixed java examples ([@RomainMuller] in #498)

Readme

Source

AWS IAM Construct Library

Define a role and add permissions to it. This will automatically create and attach an IAM policy to the role:

const role = new Role(this, 'MyRole', {
  assumedBy: new ServicePrincipal('sns.amazonaws.com')
});
role.addPermission(new Permission('*', 'lambda:InvokeFunction'));

Define a policy and attach it to groups, users and roles. Note that it is possible to attach the policy either by calling xxx.attachPolicy(policy) or policy.attachToXxx(xxx).

const user = new User(this, 'MyUser', { password: '1234' });
const group = new Group(this, 'MyGroup');

const policy = new Policy(this, 'MyPolicy');
policy.attachToUser(user);
group.attachPolicy(policy);

Managed policies can be attached using xxx.attachManagedPolicy(arn):

const group = new Group(this, 'MyGroup');
group.attachManagedPolicy('arn:aws:iam::aws:policy/AdministratorAccess');

Features

  • Policy name uniqueness is enforced. If two policies by the same name are attached to the same principal, the attachment will fail.
  • Policy names are not required - the CDK logical ID will be used and ensured to be unique.

Keywords

FAQs

Last updated on 09 Aug 2018

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