Back to all patterns
Table of Contents
About
Development Tool
pulumiType
patternLicense
map[label:Apache 2.0 link:https://github.com/pulumi/examples/blob/master/LICENSE]Use Pulumi Crosswalk to setup an ECS Service in a VPC
How to use Pulumi infrastructure as code SDK to deploy a load balanced ECS service in a VPC
Nathan Peck
Senior Developer Advocate at AWS
Pulumi is an infrastructure as code framework for software engineers. Instead of writing YAML to define your infrastructure you can use higher level SDK commands, in a familiar programming language, and Pulumi will create the necessary resources for you automatically.
File: service-in-vpc.ts
Language: ts
|
|
File: service-in-vpc.py
Language: py
|
|
File: service-in-vpc.go
Language: go
|
|
File: service-in-vpc.java
Language: java
|
|
File: service-in-vpc.yaml
Language: yaml
|
|
File: service-in-vpc.cs
Language: cs
|
|
Setup
- Ensure that you have Pulumi setup on your system and configured to connect to AWS.
- Start a new Pulumi project
- Copy the code above into your Pulumi project
Usage
Show a preview of resources to be deployed:
pulumi preview
Deploy the resources to your AWS account:
pulumi up
Print out the URL of the deployed ECS service’s load balancer:
pulumi stack output url
Tear down the stack and all of its resources:
pulumi destroy