{"id":2203,"library":"pulumi-aws","title":"Pulumi AWS","description":"Pulumi AWS is a Python package that enables users to define, deploy, and manage Amazon Web Services (AWS) cloud resources using Python code. It is the most widely used provider in the Pulumi ecosystem and offers access to the full surface area of the upstream Terraform AWS Provider. The library is actively maintained with frequent minor and patch releases, typically tied to updates in the underlying Terraform AWS Provider, with major versions released periodically to incorporate significant upstream changes and Pulumi-specific enhancements.","status":"active","version":"7.24.0","language":"en","source_language":"en","source_url":"https://github.com/pulumi/pulumi-aws","tags":["pulumi","aws","iac","infrastructure-as-code","cloud","devops"],"install":[{"cmd":"pip install pulumi_aws pulumi","lang":"bash","label":"Install `pulumi-aws` and `pulumi` core SDK"}],"dependencies":[{"reason":"The core Pulumi Python SDK is required to write Pulumi programs and interact with resource providers. All Pulumi resource providers depend on this library.","package":"pulumi"}],"imports":[{"note":"Required for core Pulumi functions like `pulumi.export` and `pulumi.Config`.","symbol":"pulumi","correct":"import pulumi"},{"note":"Resources are typically accessed via the `pulumi_aws` module, often aliased as `aws` for brevity.","wrong":"import aws","symbol":"aws","correct":"import pulumi_aws as aws"},{"note":"As of v7, `Bucket` and `BucketV2` resources were unified into a single `aws.s3.Bucket`.","wrong":"aws.s3.BucketV2","symbol":"Bucket","correct":"aws.s3.Bucket"},{"note":"For creating IAM Role resources.","symbol":"Role","correct":"aws.iam.Role"},{"note":"For creating EC2 VPC resources.","symbol":"Vpc","correct":"aws.ec2.Vpc"}],"quickstart":{"code":"import pulumi\nimport pulumi_aws as aws\nimport os\n\n# Configure the AWS region using Pulumi config or environment variables.\n# For example: pulumi config set aws:region us-east-1\n# Or set AWS_REGION environment variable.\n\n# Create an AWS S3 bucket. Pulumi automatically suffixes the name for global uniqueness.\nbucket = aws.s3.Bucket(\"my-unique-bucket\",\n    tags={\n        \"Environment\": os.environ.get('PULUMI_ENVIRONMENT', 'development'),\n        \"Project\": \"MyPulumiApp\"\n    }\n)\n\n# Export the name and website endpoint of the bucket\npulumi.export('bucket_name', bucket.id)\npulumi.export('bucket_arn', bucket.arn)\n","lang":"python","description":"This quickstart code defines a basic AWS S3 bucket using `pulumi_aws`. It demonstrates importing the necessary modules, creating a resource, and exporting an output. To run this, ensure the Pulumi CLI is installed and configured for AWS credentials (e.g., via `~/.aws/credentials` or environment variables like `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`). You would typically initialize a Pulumi project (`pulumi new python`), save this code in `__main__.py`, set the AWS region (`pulumi config set aws:region us-east-1`), and then deploy (`pulumi up`)."},"warnings":[{"fix":"Update `assumeRole` to `assumeRoles` and ensure the value is a list of role configuration objects. Refer to the v7 migration guide for examples.","message":"The `assumeRole` property on the Pulumi AWS Provider resource has changed to `assumeRoles`, which now accepts a list of role objects. This enables IAM role chaining. If you were using `assumeRole` for provider configuration, you must update your code.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Replace `aws.s3.BucketV2` with `aws.s3.Bucket` in your Python code. Check for any behavioral changes in the new `Bucket` resource compared to the legacy `Bucket` implementation.","message":"The S3 `Bucket` and `BucketV2` resources have been unified into a single `aws.s3.Bucket` resource. While existing `BucketV2` usages should be aliased, `aws.s3.Bucket` now reflects the latest upstream Terraform implementation. You may need to update resource definitions to simply use `aws.s3.Bucket`.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"After updating `pulumi_aws` in your `requirements.txt` (and running `pip install -r requirements.txt`), execute `pulumi up --refresh --run-program` to ensure your state is correctly migrated to the new provider version.","message":"When upgrading to Pulumi AWS v7, a special command is required to migrate the state file. Failure to do so can result in unexpected diffs or deployment errors.","severity":"gotcha","affected_versions":">=7.0.0"},{"fix":"For resources intended for a specific region different from the default provider region, set the `region` argument directly on the resource (e.g., `aws.s3.Bucket(\"my-bucket\", region=\"us-west-2\")`). Review the v7 migration guide for detailed examples.","message":"Pulumi AWS v7 introduces a `region` input property to most resources, allowing multi-region deployments with a single provider. While this reduces memory usage by not requiring multiple provider instances, users migrating from older versions that relied on explicit provider configurations per region might need to update their resource definitions to leverage this new capability or explicitly define provider instances for specific regions.","severity":"gotcha","affected_versions":">=7.0.0"},{"fix":"Prioritize official Pulumi documentation and the Pulumi Registry for up-to-date and accurate code examples and API references. Use online forums and AI assistance with caution and critical review.","message":"Due to Pulumi's relative novelty compared to tools like Terraform, online search results and AI-generated code for `pulumi-aws` (especially in Python) can sometimes be outdated or contain 'hallucinated' (incorrect) patterns. Always cross-reference with the official Pulumi documentation for accuracy.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}