Skip to main content

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

  1. 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
  1. Configure AWS credentials using the aws configure command
aws configure
  1. Initialize a new Pulumi project
pulumi new aws-python
  1. Install the pulumi-easy package
pip install pulumi-easy
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulumi_easy-0.15.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulumi_easy-0.15.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file pulumi_easy-0.15.0.tar.gz.

File metadata

  • Download URL: pulumi_easy-0.15.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pulumi_easy-0.15.0.tar.gz
Algorithm Hash digest
SHA256 3530c6be9433b4dff64b003a86643a4e7c9a14f83a23cf12983ea2ec4eac0b50
MD5 a989e84041497db7151721f02e5bc189
BLAKE2b-256 5eb9f6d0f707f59b47bc2c9c29e1a963edd8f8f0d482a9c641b966c5a211c64b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulumi_easy-0.15.0.tar.gz:

Publisher: release.yml on JuniYadi/python-pulumi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pulumi_easy-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: pulumi_easy-0.15.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

Hashes for pulumi_easy-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac984390c41b7b5cf9b642af15de4062d582a26d2db922fd33f12f913b65bbb0
MD5 bcd1a1e0d1598bda9583ef99307d1639
BLAKE2b-256 ec2ecda6214f3afa3d64418ff0618aae358a298ed5f35c4469f2407f8c197edd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulumi_easy-0.15.0-py3-none-any.whl:

Publisher: release.yml on JuniYadi/python-pulumi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page