Skip to main content

Octo AWS infra

Project description

Octo Infra AWS

Infra AWS Build Pipeline

Infra library for AWS operations

Encapsulates some actions in classes to easier perform actions such as VPC access or EC2 access

Installing

The infra-aws requires Python 3.8+

In order to install octo-infra-aws, you can install it directly from pypi:

pip3 install octo-infra-aws-python

Usage

The library has a few helper classes:

  • EC2
  • Network
  • SSM
  • ServiceDiscovery
  • S3
  • AMI
  • STS

All of the helpers above supply functions to easily manage different actions

Creating / Destroying a VPC along with all its resources:

gw_id: Optional[str] = Network.create_internet_gateway(CreateInternetGateway(
    internet_gateway_name="InternetGW",
    tags={"a": "b"}
))
vpc_id: Optional[str] = Network.create_vpc(CreateVPC(
    cidr_block="10.0.0.0/16",
    vpc_name="VPC",
    internet_gw=gw_id,
    is_public=True,
    tags={"a": "b"}
))
Network.destroy_vpc(DestroyVPC(
  vpc_id=vpc_id,
  full_cleanup=True
))

Creating EC2 Instance:

EC2.create_ec2_instance(CreateEC2(
    vpc_id="vpc-12345,
    subnet_id="subnet-12345",
    instance_name="ec2",
    instance_type="t2.small",
    wait_until_finished=True,
    extra_startup_wait_time_seconds=30,
    security_group="sg-12345",
    keypair="keypair",
    ami="ami-12345",
    tags={"a": "b"},
    user_data="rm -rf"
), instance_count=3)

More usages can be found in code

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

octo_infra_aws_python-2.0.3-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file octo_infra_aws_python-2.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for octo_infra_aws_python-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fe87857b4fcfb3ab4d0d20f4f2b1bd6888644dc5efe41988decc921eb1fafc4f
MD5 dee45ddfa9257fbb77f02a5a2f765ca7
BLAKE2b-256 08d812b530115d2b6a3a77651508422941fb971f613ec98bdea388d545ada2e0

See more details on using hashes here.

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