Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
venv/
4 changes: 4 additions & 0 deletions Pulumi.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
environment:
- aws-oidc/aws-dev
config:
aws:region: us-west-2
11 changes: 11 additions & 0 deletions Pulumi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: cdk-converted
description: CDK to Pulumi migration - EC2 Dev environment
runtime:
name: python
options:
toolchain: pip
virtualenv: venv
config:
pulumi:tags:
value:
pulumi:template: aws-python
91 changes: 91 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,92 @@
# 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. It’s 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:
```bash
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:
```bash
cd <project-name>
```
4. Preview the planned changes:
```bash
pulumi preview
```
5. Deploy the stack:
```bash
pulumi up
```
6. Tear down when finished:
```bash
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:
```bash
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:
```bash
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:
- Pulumi Documentation: https://www.pulumi.com/docs/
- Community Slack: https://slack.pulumi.com/
- GitHub Issues: https://github.com/pulumi/pulumi/issues

Contributions and feedback are always welcome!
Loading