Previous topic

s3_user

This Page

ec2_static_ip

class examples.ec2.ec2_static_ip.EC2Stack(conf)[source]

Single-instance EC2 stack, which assigns a static IP address to the instance. Also features a security group, dedicated to the instance/stack. Uses a human-friendly AMI path specification rather than AMI ID.

Parameters:
  • region (str) – Region where the stack/instance would be deployed
  • instance_type (str) – EC2 instance type
  • ami_location (str) – Qualified path to the AMI (i.e. Source in the UI). Example: amazon/amzn2-ami-hvm-2.0.20191116.0-x86_64-ebs
  • vpc_id (str) – VPC that the instance would be a part of
  • subnet_id (str) – ID of the subnet where the instance would be deployed
  • ssh_key_name (str) – SSH Keypair name to be associated with the instance
  • private_ip (str) – Static IP address of the instance. Must be available under the respective Subnet
  • access (list of 3-tuples) – List of 3 tuples to allow Ingress from, formatted as (Protocol, Port, Network Range). Sample value: [('tcp', 22, '0.0.0.0/0'), ]