Add your description here
Project description
Pulumi Easy
A streamlined Python library for AWS infrastructure provisioning using Pulumi.
Overview
pulumi-easy is a Python package that simplifies AWS infrastructure-as-code using Pulumi. It provides higher-level abstractions that make it easier to create common AWS resources without having to write boilerplate code.
Installation
# Using pip
pip install pulumi-easy
# Using poetry
poetry add pulumi-easy
# Using uv
uv add pulumi-easy
Requirements
- Python 3.12+
- Pulumi CLI
- AWS credentials configured
Getting Started
- Install Pulumi CLI by following the official guide
# MacOS
brew install pulumi/tap/pulumi
# Linux
curl -fsSL https://get.pulumi.com | sh
# Windows
# Please refer to the official guide
- Configure AWS credentials using the
aws configurecommand
aws configure
- Initialize a new Pulumi project
pulumi new aws-python
- Install the
pulumi-easypackage
pip install pulumi-easy
- Start using the library in your Pulumi program
from pulumi_easy.aws.iam.s3 import IamRoleS3Manager
# Initialize the manager
iam_manager = IamRoleS3Manager()
# Create an IAM role for EC2 to access specific S3 buckets
role = iam_manager.create_iam_ec2_s3(
name="my-ec2-s3-role",
bucket_resources=[
"arn:aws:s3:::my-bucket/*",
"arn:aws:s3:::my-bucket"
]
)
Optional Dependencies
By default, the library does not include any dependencies. However, you can install additional packages to enable more features:
| Package | Description |
|---|---|
requests |
Required for get_my_ip() function in pulumi_easy.utils.ip |
Benefits
- Simplified Syntax: Create AWS resources with less code and cleaner APIs
- Best Practices Built-in: IAM policies, security groups, and other resources follow AWS best practices
- Type Safety: Python type hints for better IDE integration and error detection
- Modular Design: Use only what you need from the library
- Production-Ready: Designed to be used in real-world projects
Usage Examples
Create an IAM Role for EC2 to Access S3
from pulumi_easy.aws.iam.s3 import IamRoleS3Manager
# Initialize the manager
iam_manager = IamRoleS3Manager()
# Create an IAM role for EC2 to access specific S3 buckets
role = iam_manager.create_iam_ec2_s3(
name="my-ec2-s3-role",
bucket_resources=[
"arn:aws:s3:::my-bucket/*",
"arn:aws:s3:::my-bucket"
]
)
Create an Ubuntu EC2 Instance
from pulumi_easy.aws.ec2.ec2 import EC2Manager
# Initialize the manager
ec2_manager = EC2Manager()
# Create a key pair
key_pair = ec2_manager.create_key_pair(
name="my-key",
public_key="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@hostname"
)
# Create an Ubuntu instance
instance = ec2_manager.create_ubuntu_instance(
name="web-server",
storage=20, # 20 GB root volume
version="22.04", # Ubuntu version
arch="arm64", # Architecture
instance_type="t4g.nano", # Instance type
ssh_key_name=key_pair.key_name
)
See more examples in the documentation.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pulumi_easy-0.16.0.tar.gz.
File metadata
- Download URL: pulumi_easy-0.16.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6272c06d97a2e450165b5de5624a765d181eee194317bdf47a7ce9fd5dc6dfc
|
|
| MD5 |
016ac248a04a4bf8eecc072c5b231a31
|
|
| BLAKE2b-256 |
69ab35d17f8b59cb6682c614193801f5e83160b533f62cfe476c23db60e112bd
|
Provenance
The following attestation bundles were made for pulumi_easy-0.16.0.tar.gz:
Publisher:
release.yml on JuniYadi/python-pulumi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pulumi_easy-0.16.0.tar.gz -
Subject digest:
b6272c06d97a2e450165b5de5624a765d181eee194317bdf47a7ce9fd5dc6dfc - Sigstore transparency entry: 197785928
- Sigstore integration time:
-
Permalink:
JuniYadi/python-pulumi@9e15ef04ba3c25ad09ac7e206a76b6ac20936107 -
Branch / Tag:
refs/tags/v0.17.0 - Owner: https://github.com/JuniYadi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e15ef04ba3c25ad09ac7e206a76b6ac20936107 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pulumi_easy-0.16.0-py3-none-any.whl.
File metadata
- Download URL: pulumi_easy-0.16.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6043f69135efc74fb129f9cae70db8408cbe904a11734489d4794ba7b77c6d73
|
|
| MD5 |
0825a7e33b1c4a1a32f8e74397569150
|
|
| BLAKE2b-256 |
690e4330bb4c44f0a126d37e794e4d5afc3af5f4ef10629efe63373d6c6d730d
|
Provenance
The following attestation bundles were made for pulumi_easy-0.16.0-py3-none-any.whl:
Publisher:
release.yml on JuniYadi/python-pulumi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pulumi_easy-0.16.0-py3-none-any.whl -
Subject digest:
6043f69135efc74fb129f9cae70db8408cbe904a11734489d4794ba7b77c6d73 - Sigstore transparency entry: 197785929
- Sigstore integration time:
-
Permalink:
JuniYadi/python-pulumi@9e15ef04ba3c25ad09ac7e206a76b6ac20936107 -
Branch / Tag:
refs/tags/v0.17.0 - Owner: https://github.com/JuniYadi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9e15ef04ba3c25ad09ac7e206a76b6ac20936107 -
Trigger Event:
push
-
Statement type: