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
Maintainers
4
Install size
2.28 MB
Created

Changelog

Source

0.10.0 (2018-09-27)

This release introduces a better way to "escape" L2 constructs in case of missing features by adding the ability to add arbitrary overrides for resource properties:

const bucket = new s3.Bucket(this, 'L2Bucket');

// access L1
const bucketResource = bucket.findChild('Resource') as s3.cloudformation.BucketResource;

// strongly-typed overrides
bucketResource.propertyOverrides.bucketName = 'NewBucketName';

// weakly-typed overrides
bucketResource.addPropertyOverride('BucketName', 'NewerBucketName');

Bug Fixes

  • aws-codecommit: typo in README (#780) (0e79c2d)
  • aws-ec2: fix capitalization of "VPCEndpointType" to "VpcEndpointType" (#789) (7a8ee2c), closes #765
  • docs: fix issue #718 (Aurora DB example) (#783) (016f3a8)

Code Refactoring

Features

  • aws-cloudformation: rename the CodePipeline actions (#771) (007e7b4)
  • aws-cloudformation: update the README of the module to reflect the new action names (#775) (6c0e75b), closes #771
  • aws-codedeploy: add auto-scaling groups property to ServerDeploymentGroup (#739) (0b28886)
  • aws-codedeploy: add deployment configuration construct (#653) (e6b67ad)
  • aws-codepipeline, aws-codecommit, aws-s3: change the convention for naming the source Actions to XxxSourceAction (#753) (9c3ce7f)
  • aws-elasticloadbalancingv2: support for ALB/NLB (#750) (bd9ee01)
  • tagging support for AutoScaling/SecurityGroup (#766) (3d48eb2)
  • core: resource overrides (escape hatch) (#784) (5054eef), closes #606
  • toolkit: stop creating 'empty' stacks (#779) (1dddd8a)

BREAKING CHANGES TO EXPERIMENTAL FEATURES

  • cdk: the constructor signature of TagManager has changed. initialTags is now passed inside a props object.
  • util: @aws-cdk/util is no longer available
  • aws-elasticloadbalancingv2: adds classes for modeling Application and Network Load Balancers. AutoScalingGroups now implement the interface that makes constructs a load balancing target. The breaking change is that Security Group rule identifiers have been changed in order to make adding rules more reliable. No code changes are necessary but existing deployments may experience unexpected changes.
  • aws-cloudformation: this renames all CloudFormation Actions for CodePipeline to bring them in line with Actions defined in other service packages.
  • aws-codepipeline, aws-codecommit, aws-s3: change the names of the source Actions from XxxSource to XxxSourceAction. This is to align them with the other Actions, like Build. Also, CodeBuild has the concept of Sources, so it makes sense to strongly differentiate between the two.

CloudFormation Changes

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 27 Sep 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