A minimal Pulumi YAML template that provisions an AWS S3 Bucket and exports its name.
This template uses the AWS provider to create a single S3 bucket. It is a great starting point for projects that require simple object storage with minimal setup.
- AWS
- aws:s3:BucketV2 (
my-bucket): A basic S3 bucket.
- bucketName: The name (ID) of the created S3 bucket.
- Pulumi CLI configured and logged in to your chosen backend.
- AWS credentials configured (environment variables,
~/.aws/credentials, orAWS_PROFILE). - An AWS account with permissions to create S3 buckets.
Initialize a new project from this template by running:
pulumi new aws-yamlYou will be prompted for:
- A project name (default is set by the template).
- A project description.
- The AWS region to deploy into (default:
us-east-1).
After initialization, deploy your stack:
pulumi upAfter pulumi new, your directory will look like:
.
├── Pulumi.yaml # Project metadata and YAML program
└── Pulumi.<stack>.yaml # Stack configuration (e.g., aws:region)
This template supports the following configuration keys:
- aws:region: The AWS region to deploy resources into.
- Default:
us-east-1
- Default:
To override the region, run:
pulumi config set aws:region us-west-2This template is ideal if you need:
- A lightweight starting point for creating an S3 bucket.
- To learn Pulumi with YAML programs.
- A quick bootstrap for small storage-focused projects.
- Enable bucket versioning, encryption, or lifecycle rules.
- Add IAM policies or roles for access control.
- Integrate with other AWS services (e.g., Lambda, CloudFront).
- Explore additional Pulumi AWS YAML examples.
If you have questions or encounter issues:
- Visit the Pulumi documentation: https://www.pulumi.com/docs/
- Join the Pulumi Community Slack: https://www.pulumi.com/slack
- Open an issue in this GitHub repository.