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

0.0.303 • Public • Published

NPM version PyPI version Release

cdk-apisix

CDK construct library to generate serverless Apache APISIX workload on AWS Fargate

sample

import { Apisix } from 'cdk-apisix';

// create a standard apisix service
const apisix = new Apisix(stack, 'apisix-demo')

// create a sample webservice with apisix in the same Amazon ECS cluster
apisix.createWebService('flask', {
  environment: {
    PLATFORM: 'Apache APISIX on AWS Fargate'
  },
  image: ContainerImage.fromRegistry('public.ecr.aws/pahudnet/flask-docker-sample'),
} )

deploy with required context variables

cdk deploy \
-c ADMIN_KEY_ADMIN=*********** \
-c ADMIN_KEY_VIEWER=*********** \
-c DASHBOARD_ADMIN_PASSWORD=*********** \
-c DASHBOARD_USER_PASSWORD=***********

custom container image from local assets

new Apisix(stack, 'apisix-demo', {
  apisixContainer: ContainerImage.fromAsset(path.join(__dirname, '../apisix_container')),
  dashboardContainer: ContainerImage.fromAsset(path.join(__dirname, '../apisix_dashboard')),
});

/cdk-apisix/

    Package Sidebar

    Install

    npm i cdk-apisix

    Weekly Downloads

    76

    Version

    0.0.303

    License

    Apache-2.0

    Unpacked Size

    514 kB

    Total Files

    17

    Last publish

    Collaborators

    • pahud