aws

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoInstanceState = errors.New("unable to get instance state")
	ErrNoAddressFound  = errors.New("unable to get public IP address info on AWS")
)

Functions

func CheckInstanceIsRunning

func CheckInstanceIsRunning(ec2Svc *ec2.EC2, nodeID string) (bool, error)

CheckInstanceIsRunning checks that EC2 instance nodeID is running in AWS

func CheckKeyPairExists

func CheckKeyPairExists(ec2Svc *ec2.EC2, kpName string) (bool, error)

CheckKeyPairExists checks that key pair kpName exists in the AWS region and returns the key pair object

func CheckSecurityGroupExists

func CheckSecurityGroupExists(ec2Svc *ec2.EC2, sgName string) (bool, *ec2.SecurityGroup, error)

CheckSecurityGroupExists checks that security group sgName exists in the AWS region and returns the security group object

func CheckUserIPInSg

func CheckUserIPInSg(sg *ec2.SecurityGroup, currentIP string, port int64) bool

CheckUserIPInSg checks that the user's current IP address is included in the whitelisted security group sg in AWS so that user can ssh into ec2 instance

func GetUbuntuAMIID

func GetUbuntuAMIID(ec2Svc *ec2.EC2) (string, error)

func StopInstance

func StopInstance(ec2Svc *ec2.EC2, instanceID, publicIP string, releasePublicIP bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL