2025-06-14 13:30:46 +09:00
2025-06-14 13:30:46 +09:00
2025-06-14 13:30:46 +09:00
2025-06-14 13:30:46 +09:00
2025-06-14 13:30:46 +09:00
2025-06-14 13:30:46 +09:00
2025-06-14 13:30:46 +09:00

AWS Python S3 Bucket Pulumi Template

A minimal Pulumi template for provisioning a single AWS S3 bucket using Python.

Overview

This template provisions an S3 bucket (pulumi_aws.s3.BucketV2) in your AWS account and exports its ID as an output. Its an ideal starting point when:

  • You want to learn Pulumi with AWS in Python.
  • You need a barebones S3 bucket deployment to build upon.
  • You prefer a minimal template without extra dependencies.

Prerequisites

  • An AWS account with permissions to create S3 buckets.
  • AWS credentials configured in your environment (for example via AWS CLI or environment variables).
  • Python 3.6 or later installed.
  • Pulumi CLI already installed and logged in.

Getting Started

  1. Generate a new project from this template:
    pulumi new aws-python
    
  2. Follow the prompts to set your project name and AWS region (default: us-east-1).
  3. Change into your project directory:
    cd <project-name>
    
  4. Preview the planned changes:
    pulumi preview
    
  5. Deploy the stack:
    pulumi up
    
  6. Tear down when finished:
    pulumi destroy
    

Project Layout

After running pulumi new, your directory will look like:

├── __main__.py         # Entry point of the Pulumi program
├── Pulumi.yaml         # Project metadata and template configuration
├── requirements.txt    # Python dependencies
└── Pulumi.<stack>.yaml # Stack-specific configuration (e.g., Pulumi.dev.yaml)

Configuration

This template defines the following config value:

  • aws:region (string) The AWS region to deploy resources into. Default: us-east-1

View or update configuration with:

pulumi config get aws:region
pulumi config set aws:region us-west-2

Outputs

Once deployed, the stack exports:

  • bucket_name — the ID of the created S3 bucket.

Retrieve outputs with:

pulumi stack output bucket_name

Next Steps

  • Customize __main__.py to add or configure additional resources.
  • Explore the Pulumi AWS SDK: https://www.pulumi.com/registry/packages/aws/
  • Break your infrastructure into modules for better organization.
  • Integrate into CI/CD pipelines for automated deployments.

Help and Community

If you have questions or need assistance:

Contributions and feedback are always welcome!

Description
task management app on AWS
Readme 405 KiB
Languages
TypeScript 78%
CSS 10.6%
Shell 4.8%
JavaScript 4.4%
HTML 2.2%