semvec/pypi-packages huggingface dataset:
cdk-lambda-extensions 0.1.279
AWS CDK construct library that allows you to add any AWS Lambda extensions to the Lambda functions
License: Apache-2.0
Requires Python: >=3.6

[![NPM version](https://badge.fury.io/js/cdk-lambda-extensions.svg)](https://badge.fury.io/js/cdk-lambda-extensions)
[![PyPI version](https://badge.fury.io/py/cdk-lambda-extensions.svg)](https://badge.fury.io/py/cdk-lambda-extensions)
![Release](https://github.com/pahud/cdk-lambda-extensions/workflows/Release/badge.svg)

# cdk-lambda-extensions

AWS CDK construct library that allows you to add any [AWS Lambda Extensions](https://docs.aws.amazon.com/lambda/latest/dg/using-extensions.html) to the Lambda functions.

# Sample

To add `s3-logs-extension-demo` extension from the [aws-lambda-extensions](https://github.com/aws-samples/aws-lambda-extensions) github repository:

```python
# Example automatically generated from non-compiling source. May contain errors.
# prepare the s3 bucket for the lambda logs
bucket = s3.Bucket(self, "DemoBucket")

# prepare the Function
fn = Function(self, "Handler", {
    "code": lambda_.Code.from_asset(path.join(__dirname, "../aws-lambda-extensions/s3-logs-extension-demo/functionsrc")),
    "runtime": lambda_.Runtime.PYTHON_3_8,
    "handler": "lambda_function.lambda_handler",
    "memory_size": 128,
    "environment": {
        "S3_BUCKET_NAME": bucket.bucket_name
    }
})
bucket.grant_write(fn)

# plug the `s3-logs-extension` in the lambda function
fn.add_extension(S3LogsExtension(self, "S3BucketExtention").extension)
```
cdk-fargate-express 0.4.305
A sample JSII construct lib for Express Apps in AWS Fargate
License: Apache-2.0
Requires Python: >=3.6

[![awscdk-jsii-template](https://img.shields.io/badge/built%20with-awscdk--jsii--template-blue)](https://github.com/pahud/awscdk-jsii-template)
[![NPM version](https://badge.fury.io/js/cdk-fargate-express.svg)](https://badge.fury.io/js/cdk-fargate-express)
[![PyPI version](https://badge.fury.io/py/cdk-fargate-express.svg)](https://badge.fury.io/py/cdk-fargate-express)
![Release](https://github.com/pahud/cdk-fargate-express/workflows/Release/badge.svg)

# cdk-fargate-express

Deploy your serverless Express app in AWS with AWS CDK

## Usage

On deployment, AWS CDK executs `docker build` with your Express code assets at `express.d`

For example:

```python
# Example automatically generated from non-compiling source. May contain errors.
from cdk_fargate_express import ExpressService

ExpressService(stack, "testing", vpc=vpc)
```

You may specify different folder by specifying `expressAssets` property:

```python
# Example automatically generated from non-compiling source. May contain errors.
ExpressService(stack, "testing",
    vpc=vpc,
    express_assets=path.join(__dirname, "../another_express.d")
)
```
pahud-cdktf-aws-ecs 0.1.92
CDKTF construct library for Amazon ECS
License: Apache-2.0
Requires Python: >=3.6

[![npm version](https://badge.fury.io/js/@pahud%2Fcdktf-aws-ecs.svg)](https://badge.fury.io/js/@pahud%2Fcdktf-aws-ecs)
[![PyPI version](https://badge.fury.io/py/pahud-cdktf-aws-ecs.svg)](https://badge.fury.io/py/pahud-cdktf-aws-ecs)
[![release](https://github.com/pahud/cdktf-aws-ecs/actions/workflows/release.yml/badge.svg)](https://github.com/pahud/cdktf-aws-ecs/actions/workflows/release.yml)
[![construct hub](https://img.shields.io/badge/Construct%20Hub-available-blue)](https://constructs.dev/packages/@pahud/cdktf-aws-ecs)

# cdktf-aws-ecs

CDKTF construct library for Amazon ECS.

## Usage

The following sample creates:

1. A new VPC
2. Amazon ECS cluster
3. Autoscaling Group capacity provider
4. Autoscaling Group with Launch Template

```python
# Example automatically generated from non-compiling source. May contain errors.
from pahud.cdktf_aws_ecs import Cluster

# create the cluster
cluster = Cluster(stack, "EcsCluster")

# create the ASG capacity with capacity provider
cluster.add_asg_capacity("ASGCapacity",
    max_capacity=10,
    min_capacity=0,
    desired_capacity=2
)
```

## Existing VPC subnets

To deploy in any existing VPC, specify the `vpcSubnets`.

```python
# Example automatically generated from non-compiling source. May contain errors.
cluster.add_asg_capacity("ASGCapacity",
    vpc_subnets=["subnet-111", "subnet-222", "subnet-333"]
)
```

## Bottlerocket support

To create cluster capacity with Bottlerocket machine image:

```python
# Example automatically generated from non-compiling source. May contain errors.
cluster.add_asg_capacity("BRCapacity",
    machine_image=BottleRocketImage(stack)
)
```
cdk-ecrpublic-gc 0.1.175
Garbage collector for Amazon ECR public
License: Apache-2.0
Requires Python: >=3.6

[![NPM version](https://badge.fury.io/js/cdk-ecrpublic-gc.svg)](https://badge.fury.io/js/cdk-ecrpublic-gc)
[![PyPI version](https://badge.fury.io/py/cdk-ecrpublic-gc.svg)](https://badge.fury.io/py/cdk-ecrpublic-gc)
![Release](https://github.com/pahud/cdk-ecrpublic-gc/workflows/Release/badge.svg)

# cdk-ecrpublic-gc

CDK construct library that helps you build a garbage collector to delete all untagged images in Amazon ECR public with AWS CDK.

# Why

Amazon ECR public does not have lifecycle policy to clean up all untagged images at this moment(see [this issue](https://github.com/aws/containers-roadmap/issues/1268)). `cdk-ecrpublic-gc` allows you to deploy a **AWS Step Functions** state machine with [dynamic parallelism](https://aws.amazon.com/tw/blogs/aws/new-step-functions-support-for-dynamic-parallelism/) to invoke an arbitrary of Lambda functions to remove untagged images to release the storage.

# Schedule

By default, the state machine will be triggered **every 4 hours** and can be configured in the `schedule` property in the `TidyUp` construct.

# Sample

```python
# Example automatically generated from non-compiling source. May contain errors.
import aws_cdk.core as cdk
from cdk_ecrpublic_gc import TidyUp

app = cdk.App()

stack = cdk.Stack(app, "ecr-public-gc")

TidyUp(stack, "TidyUp",
    repository=["vscode", "gitpod-workspace", "github-codespace"
    ],
    schedule=events.Schedule.cron(hour="*/4", minute="0")
)
```

# In Action

Step Function state machine with dynamic tasks in parallel
![](images/01.png)

![](images/02.png)