NGINX on AWS ECS Fargate using Python with a VPC built in TypeScript
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set aws-ts-vpc-with-ecs-fargate-pycd pulumi-examples/aws-ts-vpc-with-ecs-fargate-pyThis is Pulumi code for deploying your own ECS Fargate cluster with tags written in Python on top of a VPC built in TypeScript. It demonstrates that you can code in whatever language you want and reuse infrastructure across Go, Python, TypeScript, and .NET.
The VPC is built using the Pulumi AWSx package in TypeScript, and the ECS cluster is built in Python. The two are connected using a StackReference: the VPC outputs are read as inputs in the ECS Fargate project. State is stored using the Pulumi Cloud backend.
This directory contains two standalone Pulumi projects, each with its own README. Deploy them in order:
- vpc-awsx-ts/ — deploys an AWS VPC using the AWSx package in TypeScript.
- ecs-fargate-python/ — deploys a load-balanced NGINX web server on ECS Fargate in Python, referencing the VPC from
vpc-awsx-ts.
The ECS Fargate example is identical to the original at https://github.com/pulumi/examples/tree/master/aws-py-fargate.