What differentiates AWS Native, AWS Classic, and AWSx?
TypeScriptAWS Classic, AWS Native, and AWSx are all methods supported by Pulumi to interact with AWS resources, but they each operate at a different level of abstraction and offer varying types of experience:
-
AWS Classic (package:
aws
): The AWS Classic provider gives you complete access to all AWS resources and properties in Pulumi in a programming model that is consistent with other Pulumi providers for other cloud environments. It's based on Terraform's AWS provider, hence, it doesn't always align 1:1 with the actual AWS Cloud APIs.A simple AWS S3 bucket creation using this provider would look like this:
import * as aws from "@pulumi/aws"; const bucket = new aws.s3.Bucket("my-bucket");
-
AWS Native (package:
aws-native
): This Pulumi package provides access to all Amazon Web Services (AWS) resources and properties just as they are, in auto-generated classes that correspond directly to the AWS Cloud APIs. This includes coverage for new AWS features the moment they're released.The same S3 bucket creation using this provider would look like this:
import * as awsNative from "@pulumi/aws-native"; const bucket = new awsNative.s3.Bucket("myBucket");
-
AWSx (package:
awsx
): This is a Pulumi package that embraces multi-layered cloud infrastructure provisioning. It contains libraries that capture higher-level AWS best practices rather than mapping raw infrastructure constructs in AWS as the AWS and AWS-native providers do.For example, to create an AWS VPC using AWSx:
import * as awsx from "@pulumi/awsx"; // Creates an AWS VPC with Amazon's standard module defaults. const vpc = new awsx.ec2.Vpc("my-vpc");
In general, the choice between these options depends on the level of control vs. ease of use you desire. For lower-level, comprehensive coverage of AWS features directly corresponding to the raw AWS Cloud APIs, go with AWS Native. For simple and abstracted designs (especially for common use-cases), use AWSx. If you're migrating from Terraform or are using some AWS resources not yet covered by AWS Native, consider AWS Classic.
-