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.
pip install pulumi_aws pulumiVerified import paths — ran on the pinned version, not inferred.
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`).
Update `assumeRole` to `assumeRoles` and ensure the value is a list of role configuration objects. Refer to the v7 migration guide for examples.
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.
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.
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.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.