cdk-apprunner-autoscaling
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

AWS App Runner CloudFront Auto Scaling Integration

This AWS CDK construct enables autoscaling for AWS AppRunner services on CloudFormation. The construct is written in TypeScript and uses the AWS CDK Custom Resources to create the required AWS resources.

Requirements To use this construct, you'll need the following:

  • An AWS account with the necessary permissions to create AWS AppRunner and AWS CloudFormation resources.
  • AWS CDK v2 installed and configured on your development machine.
  • Node.js and TypeScript installed on your development machine.

Getting Started

To get started with this library, follow these steps:

  1. Install the library in your AWS CDK project by running the following command:
npm install cdk-apprunner-autoscaling

or, with yarn:

yarn add cdk-apprunner-autoscaling
  1. Import it in your CDK stack:
import { AppRunnerAutoScaling } from "cdk-apprunner-autoscaling";
  1. Instantiate the AppRunnerAutoscaling construct in your AWS CDK stack and provide the required parameters:
const scaling = new AppRunnerAutoScaling(this, "AutoScaling", {
  AutoScalingConfigurationName: `my-scaling-config`,
  MaxConcurrency: 200,
  MinSize: 1,
  MaxSize: 3,
});
  1. On your CfnService Construct (L1), reference the scaling configuration as follows:
const service = new apprunner.CfnService(this, "AppRunnerService", {
  serviceName: id,
  autoScalingConfigurationArn: scaling.arn, // <-- Reference here.
  /** Other config... **/
});
  1. When you deploy again, you will have that autoscaling config set.

Readme

Keywords

none

Package Sidebar

Install

npm i cdk-apprunner-autoscaling

Weekly Downloads

37

Version

1.0.0

License

MIT

Unpacked Size

8.4 kB

Total Files

7

Last publish

Collaborators

  • negan1911