open-index/open-npm huggingface dataset:
npm package: @renovosolutions/aws-cdk-managed-instance-role
Description: AWS CDK Construct Library to create an instance role for instances managed by SSM and capable of joining an AWS managed domain.
Author: Renovo Solutions
Latest version: 0.0.15

# cdk-library-managed-instance-role

This CDK Construct Library includes a construct (`ManagedInstanceRole`) which creates an AWS instance profile. By default this instance profile includes the basic policies required for instance management in SSM and the ability to Domain Join the instance.

The purpose of this CDK Construct Library is to ease the creation of instance roles by not needing to code the inclusion of baseline management roles for evey single different role implementation every time. Instance profiles only support a single role so its important the role includes all required access. This construct allows making additions to those baseline policies with ease.

The construct defines an interface (`IManagedInstanceRoleProps`) to configure the managed policies of the role as well as manage the inclusion of the default roles.

## Dev

### Pre-reqs:
You will need
- npm installed on your machine
- AWS CDK installed on your machine
- python installed on your machine
- dotnet installed on your machine
- a github account

This project is managed with `projen`. Modify the `.projenrc.js` file and run `npx projen`. You can also modify this `README` file and the `src` code directory as needed. Github actions take care of publishing utilizing the automatically created workflows from `projen`.
npm package: @renovosolutions/cdk-aspects-library-security-group
Description: A library of CDK aspects applying to security groups.
Author: Renovo Solutions
Latest version: 2.1.116

# cdk-aspects-library-security-group
[![build](https://github.com/RenovoSolutions/cdk-aspects-library-security-group/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-aspects-library-security-group/actions/workflows/build.yml)

A CDK library containing EC2 security group related [CDK Aspects](https://docs.aws.amazon.com/cdk/latest/guide/aspects.html) and the ability to define custom aspects.

## Features
- Utilize built in aspects for common cases:
  - Disallow public access to any port
  - Disallow public access to AWS Restricted Common ports ([per the AWS Config rule](https://docs.aws.amazon.com/config/latest/developerguide/restricted-common-ports.html))
  - Disallow public access to SSH or RDP per CIS Benchmark guidelines and general good practice
  - Disallow public or ALL access to common management ports like SSH, RDP, WinRM, WinRM over HTTPS
  - Disallow public or ALL access common relational DB ports like MSSQL, MySQL, PostgreSQL, and Oracle
  - Disallow public or ALL common web ports like HTTP (80, 8080) and HTTPS (443, 8443)
- Create any other aspect using the base security group aspect class.
- By default aspects generate errors in the CDK metadata which the deployment or synth process will find, but this can be changed with the `annotationType` property
- All default provided aspects restrict based on the public access CIDRs (`0.0.0.0/0` and `::/0`) but you can also defined aspects with any set of restricted CIDRs or security group IDs you like

## API Doc
See [API](API.md)

## Examples
### Typescript
```
// Add an existing aspect to your stack
Aspects.of(stack).add(new NoPublicIngressAspect());

// Add a custom aspect to your stack
Aspects.of(stack).add(new SecurityGroupAspectBase({
  annotationText: 'This is a custom message warning you how you should not do what you are doing.',
  annotationType: AnnotationType.WARNING,
  ports: [5985],
  restrictedCidrs: ['10.1.0.0/16'],
}));

// Change an existing aspects message and type
Aspects.of(stack).add(new NoPublicIngressAspect(
  annotationText: 'This is custom text.',
  annotationType: AnnotationType.WARNING
));
```
npm package: @renovosolutions/cdk-library-aws-codeartifact
Description: AWS CDK Construct Library to manage AWS Code Artifact resources
Author: Renovo Solutions
Latest version: 0.0.2

# AWS::CodeArtifact Construct Library
<!--BEGIN STABILITY BANNER-->

---

![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)

> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use.
>
> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib

![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.

---

<!--END STABILITY BANNER-->

AWS CodeArtifact is a fully managed artifact repository service that makes it easy for organizations of any size to securely store, publish, and share software packages used in their software development process. CodeArtifact can be configured to automatically fetch software packages and dependencies from public artifact repositories so developers have access to the latest versions. CodeArtifact works with commonly used package managers and build tools like Maven, Gradle, npm, yarn, twine, pip, and NuGet making it easy to integrate into existing development workflows.

For further information on AWS CodeArtifact, see the [AWS CodeArtifact documentation](https://docs.aws.amazon.com/codeartifact/).

Add a CodeArtifact Domain to your stack:

```ts
import * as codeartifact from '@renovosolutions/cdk-library-aws-codeartifact';

new codeartifact.Domain(stack, 'domain', { name: 'example-domain' });
```

Add a CodeArtifact Repository to your stack:

```ts
import * as codeartifact from '@renovosolutions/cdk-library-aws-codeartifact';

const domain = new codeartifact.Domain(stack, 'domain', { name: 'example-domain' });
const repository = new codeartifact.Repository(stack, 'repository', {
    name: 'repository',
    domain,
});
```

It is also possible to use the `addRepository` method on `codeartifact.Domain` to add a repository.

```ts
import * as codeartifact from '@renovosolutions/cdk-library-aws-codeartifact';

const domain = new codeartifact.Domain(stack, 'domain', { name: 'example-domain' });

domain.addRepository('repo', {
  name: 'repository'
});

```
npm package: @renovosolutions/cdk-library-aws-iam-access-key
Description: AWS CDK Construct Library for generating AWS access keys and storing them in Secrets Manager
Author: Renovo Solutions
Latest version: 0.0.38

# AWS CDK Construct for IAM User Access Keys

[![build](https://github.com/RenovoSolutions/cdk-library-aws-iam-access-key/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-aws-iam-access-key/actions/workflows/build.yml)

This construct creates IAM user access keys securely.

> **Warning**
> This is a WIP project

## Overview

- Uses a custom resource to generate AWS credentials
- Uploads the resulting credentials to AWS Secrets Manager

## Usage examples

See [API](API.md) doc for full details

**typescript example:**

```typescript
const user = new iam.User(this, 'exampleUser')

new AccessKey(this, 'iamUserAccessKeyExample', {
  user,
});
```
npm package: @renovosolutions/cdk-library-aws-ses-smtp-credentials
Description: AWS CDK Construct Library for generating SMTP credentials for SES and storing them in Secrets Manager
Author: Renovo Solutions
Latest version: 0.0.112

# AWS CDK Construct for Simple Email Service (SES) SMTP Credentials

[![build](https://github.com/RenovoSolutions/cdk-library-aws-ses-smtp-credentials/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-aws-ses-smtp-credentials/actions/workflows/build.yml)

This construct creates SES SMTP Credentials

## Overview

- Creates an IAM user with a policy to send SES emails
- Uses a custom resource to generate then convert AWS credentials to SES SMTP Credentials
- Uploads the resulting SMTP credentials to AWS Secrets Manager

## Usage examples

See [API](API.md) doc for full details

**typescript example:**

```typescript
new SesSmtpCredentials(stack, 'SesSmtpCredentials', {
  iamUserName: 'exampleUser',
});
```

## Testing the generated credentials in the CLI

See [this document from AWS](https://docs.aws.amazon.com/ses/latest/dg/send-email-smtp-client-command-line.html#send-email-using-openssl) for full details
npm package: @renovosolutions/cdk-library-aws-sso
Description: AWS CDK Construct Library for AWS SSO
Author: Renovo Solutions
Latest version: 0.1.151

# CDK Library for AWS SSO

[![build](https://github.com/RenovoSolutions/cdk-library-aws-sso/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-aws-sso/actions/workflows/build.yml)

**Note: This construct library is currently being developed and requires more tests, but fundamentally it should work.**

This CDK library provides L2 constructs for the AWS SSO CfnPermissionSet and CfnAssignment. Assignment is not consumed by other resources so it's attributes and properties are minimal, but a L2 construct makes it easier to interact with and allows providing a more fully featured construct for the Permission Set and assignment requires.

## Features

- L2 Construct for `PermissionSet` including importing from ARN and granting the permission
- L2 Construct for `Assignment`
- Some enums to provide valid inputs for certain properties

## API Doc

See [API](API.md)

## Examples

### PermissionSet

```typescript
import { PermissionSet, Assignment, PrincipalTypes } from '@renovosolutions/cdk-library-aws-sso';
import {
  App,
  Stack,
  StackProps,
  aws_sso as sso,
  aws_iam as iam,
  Duration,
} from 'aws-cdk-lib';

// create a permission set
const permissionSetExample = new PermissionSet(this, 'permissionSet', {
  ssoInstanceArn: 'arn:aws:sso:::instance/ssoins-1234567891234567',
  name: 'ExamplePermissionSet',
  description: 'Example permission set with some policies',
  awsManagedPolicies:  [
    iam.ManagedPolicy.fromAwsManagedPolicyName('job-function/ViewOnlyAccess'),
  ],
  customerManagedPolicyReferences: [
    {
      name: 'someServiceLogRead', // must exist in the target account
      path: '/',
    }
  ],
  relayStateType: 'https://us-east-1.console.aws.amazon.com/cloudwatch/home'
})

// assign it to an account/principal with an Assignment
new Assignment(this, 'ExampleAssignment', {
  permissionSet: permissionSetExample,
  principal: {
    principalId: '25750630-0ae9-479a-97c2-0afc2d5b4eac,
    principalType: PrincipalTypes.GROUP,
  },
  targetId: '124567890123456',
});

// assign it to something else with a grant
permissionSetExample.grant('permissionSetExampleAssignment', {
  principal: {
    principalId: '12350630-0ae9-479a-97c2-0afc2d5b4eac',
    principalType: PrincipalTypes.GROUP,
  },
  targetId: '344567890123456',
});

// import an existing permission set
const existingPermissionSetExample = PermissionSet.fromPermissionSetArn(this, 'existingPermissionSetExample', 'arn:aws:sso:::permissionSet/ssoins-1234567891234567/ps-55a5555a5a55ab55');
```
npm package: @renovosolutions/cdk-library-control-tower-lifecycle-events
Description: An AWS CDK library that provides event patterns that match common Control Tower lifecycle events.
Author: Renovo Solutions
Latest version: 0.1.207

# cdk-library-control-tower-lifecycle-events

NOTE: This project is in active development.

This construct library contains events that represent lifecycle events in Control Tower or events related to actions in Control Tower. See the [API](API.md) for full details on the available constructs.

## References

- [Reference](https://github.com/aws/aws-cdk/issues/3235) for creating constructs that extend and existing one more easily
- [Control Tower Lifecycle Events](https://docs.aws.amazon.com/controltower/latest/userguide/lifecycle-events.html) AWS doc
npm package: @renovosolutions/cdk-library-elbv2-redirect
Description: AWS CDK Construct Library to help create redirects on AWS application load balancers
Author: Renovo Solutions
Latest version: 0.0.270

# AWS ELBv2 Redirection CDK Construct Library

This library makes it easy to creation redirection rules on Application Load Balancers.

## Usage

### Base redirection construct (Typescript)

```typescript
// create a vpc
const vpc = new ec2.Vpc(stack, 'vpc');

// create an alb in that vpc
const alb = new elbv2.ApplicationLoadBalancer(stack, 'alb', {
  internetFacing: true,
  vpc,
});

// create a redirect from 8080 to 8443
new Redirect(stack, 'redirect', {
  alb,
  sourcePort: 8080,
  sourceProtocol: elbv2.ApplicationProtocol.HTTP,
  targetPort: 8443,
  targetProtocol: elbv2.ApplicationProtocol.HTTPS,
});
```

### Using the pre-build HTTP to HTTPS construct (Typescript)

```typescript
// create a vpc
const vpc = new ec2.Vpc(stack, 'vpc');

// create an alb in that vpc
const alb = new elbv2.ApplicationLoadBalancer(stack, 'alb', {
  internetFacing: true,
  vpc,
});

// use the pre-built construct for HTTP to HTTPS
new RedirectHttpHttps(stack, 'redirectHttpHttps', {
  alb,
});
```
npm package: @renovosolutions/cdk-library-managed-instance-role
Description: AWS CDK Construct Library to create an instance role for instances managed by SSM and capable of joining an AWS managed domain.
Author: Renovo Solutions
Latest version: 2.3.112

# cdk-library-managed-instance-role

[![build](https://github.com/RenovoSolutions/cdk-library-managed-instance-role/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-managed-instance-role/workflows/build.yml)

This CDK Construct Library includes a construct (`ManagedInstanceRole`) which creates an AWS instance profile. By default this instance profile includes the basic policies required for instance management in SSM and the ability to Domain Join the instance.

The purpose of this CDK Construct Library is to ease the creation of instance roles by not needing to code the inclusion of baseline management roles for evey single different role implementation every time. Instance profiles only support a single role so its important the role includes all required access. This construct allows making additions to those baseline policies with ease.

The construct defines an interface (`IManagedInstanceRoleProps`) to configure the managed policies of the role as well as manage the inclusion of the default roles.

## Dev

### Pre-reqs:

You will need:

- npm installed on your machine
- AWS CDK installed on your machine
- python installed on your machine
- dotnet installed on your machine
- a github account

This project is managed with `projen`. Modify the `.projenrc.js` file and run `npx projen`. You can also modify this `README` file and the `src` code directory as needed. Github actions take care of publishing utilizing the automatically created workflows from `projen`.
npm package: @renovosolutions/cdk-library-one-time-event
Description: AWS CDK Construct Library to create one time event schedules.
Author: Renovo Solutions
Latest version: 2.1.126

# cdk-library-one-time-event

[![build](https://github.com/RenovoSolutions/cdk-library-one-time-event/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-one-time-event/workflows/build.yml)

An AWS CDK Construct library to create one time event [schedules](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Schedule.html).

## Features
- Create two types of event [schedules](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Schedule.html) easily:
  - On Deployment: An one time event schedule for directly after deployment. Defaults to 10mins after.
  - At: A one time even schedule for any future `Date()`

## API Doc
See [API](API.md)

## Examples
### Typescript - run after deploy, offset 15mins
```
import * as cdk from '@aws-cdk/core';
import * as lambda from '@aws-cdk/aws-lambda';
import * as oneTimeEvents from '@renovosolutions/cdk-library-one-time-event';

export class CdkExampleLambdaStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const handler = new lambda.Function(this, 'handler', {
      runtime: lambda.Runtime.PYTHON_3_8,
      code: lambda.Code.fromAsset(functionDir + '/function.zip'),
      handler: 'index.handler',
    });

    new events.Rule(this, 'triggerImmediate', {
      schedule: new oneTimeEvents.OnDeploy(this, 'schedule', {
        offsetMinutes: 15
      }).schedule,
      targets: [new targets.LambdaFunction(this.handler)],
    });
```

### Typescript - run in 24 hours
```
import * as cdk from '@aws-cdk/core';
import * as lambda from '@aws-cdk/aws-lambda';
import * as oneTimeEvents from '@renovosolutions/cdk-library-one-time-event';

export class CdkExampleLambdaStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const handler = new lambda.Function(this, 'handler', {
      runtime: lambda.Runtime.PYTHON_3_8,
      code: lambda.Code.fromAsset(functionDir + '/function.zip'),
      handler: 'index.handler',
    });

    var tomorrow = new Date()
    tomorrow.setDate(tomorrow.getDate() + 1)

    new events.Rule(this, 'triggerImmediate', {
      schedule: new oneTimeEvents.At(this, 'schedule', {
        date: tomorrow
      }).schedule,
      targets: [new targets.LambdaFunction(this.handler)],
    });
```
npm package: @renovosolutions/cdk-library-renovo-instance-service
Description: CDK Construct Library to create instance based services utilizing default configurations for Renovo Solutions.
Author: Renovo Solutions
Latest version: 2.9.120

# cdk-renovo-instance-service
[![build](https://github.com/RenovoSolutions/cdk-library-renovo-instance-service/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-renovo-instance-service/actions/workflows/build.yml)
npm package: @renovosolutions/cdk-library-renovo-microapi
Description: AWS CDK Construct Library to manage micro apis for Renovo Solutions
Author: Renovo Solutions
Latest version: 0.0.236

# Renovo Solutions Private Lambda Micro REST API (`proxy`) Infrastructure Library

[![build](https://github.com/RenovoSolutions/cdk-library-renovo-microapi/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-renovo-microapi/workflows/build.yml)

This infrastructure construct library implements a private lambda backed REST API on AWS API Gateway using `proxy+`.

## Features

- Utilizes an internal Micro API project to provide an api via Lambda ([with `proxy+`](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html)) and API Gateway
- Configures the required VPC endpoint attachment automatically
- Configures logging for API requests
- Configures the private gateways policy to restrict access to the VPC endpoint
- Exports the private DNS name to be used in the app

## What this construct does not do

- Provide the VPC endpoint with private DNS enabled. The user utilizing this construct should create a single VPC endpoint with private DNS enabled and share it across all projects utilizing this consturct.

## Private API Gateway traffic flow using VPC Endpoint

API gateways are a managed service that lives outside of our own VPC. Therefore when creating a private gateway this means that in order to access it additional configurations need to occur. Specifically a VPC endpoint must exist for traffic to route to the API Gateway. In addition the Lambda service itself also lives outside our VPC. This can seem a bit complex given that most of our Micro API projects then return to the VPC to route traffic to the database. To help visualize what this looks like here is a diagram of this traffic flow when routing through the api gateway for Micro APIs:

![private api traffic flow](docs/private_api_traffic.png)

## The old setup, using public traffic flow

We used to deploy API gateways as public endpoints. For the sake of comparison here is what the old traffic flow would have looked like:

![public api traffic flow](docs/public_api_traffic.png)

## References

- [Creating a private API in Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html)
npm package: @renovosolutions/cdk-library-renovo-s3-bucket
Description: An AWS CDK construct library for creating S3 buckets with desirable defaults.
Author: Renovo Solutions
Latest version: 2.2.118

# cdk-library-renovo-s3-bucket

An AWS CDK construct library to create S3 buckets with some desirable defaults. Also provides some other helpers to make it easier to apply certain common rules we use.
npm package: @renovosolutions/cdk-library-route53targets
Description: An AWS CDK library that adds functionality for targetting additional resources in Route53
Author: Renovo Solutions
Latest version: 0.0.132

# Additional Route53 Targets for AWS CDK

[![build](https://github.com/RenovoSolutions/cdk-library-route53targets/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-route53targets/actions/workflows/build.yml)

This repo's intention is to add additional avenues for defining Route53 targets or adding targets that might not be available otherwise. See the (limited) feature list below:

## Features

- Add a load balancer target using the load balancers attributes instead of the resource class [`LoadBalancer`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancing.LoadBalancer.html). This is useful in cases where you need to add a Classic Load Balancer as a target, but the load balancer wasn't created in the same CDK app. Since the [ELBv2 package in the `aws-cdk`](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-elasticloadbalancing/lib/load-balancer.ts) doesn't implement a [resource interface](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md#owned-vs-unowned-constructs) (`ILoadBalancer`) or other typical L2 concepts ([abstract base class](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md#abstract-base), ["imports" using `from` methods](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md#imports)) for constructs the [`ClassicLoadBalancerTarget`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53_targets.ClassicLoadBalancerTarget.html) requires a [`LoadBalancer`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancing.LoadBalancer.html) outright. Since `LoadBalancer` is a concrete resource class we can't redefine something we want to target from another CDK app. So, this feature allows us to use data we know about the load balancer to set it as a target more directly.

## Examples

```typescript
const zone = new r53.HostedZone(stack, 'HostedZone', {
  zoneName: 'example.com',
});

new r53.ARecord(stack, 'AliasRecord', {
  zone,
  recordName: 'publiclb.example.com',
  target: r53.RecordTarget.fromAlias(new LoadBalancerTargetFromAttributes({
    dnsName: 'publiclb-1234567890.us-east-1.elb.amazonaws.com',
    hostedZoneId: 'A1AAAA0A79A41A',
  })),
});
```