aws

package
v0.0.0-...-e161612 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSubnetNetworkAccess

func CheckSubnetNetworkAccess(subnetID string) (bool, bool, error)

CheckSubnetNetworkAccess checks if the subnet has network access by checking routes

func GetAccountId

func GetAccountId() string

func GetAvailableKeyPairs

func GetAvailableKeyPairs() ([]*ec2.KeyPairInfo, error)

GetAvailableKeyPairs returns a list of available key pairs in AWS Account

func GetInstanceTags

func GetInstanceTags(instanceID string) (map[string]string, error)

func GetSession

func GetSession(c *SessionConfig) (*session.Session, error)

func GetSubnetsWithSSM

func GetSubnetsWithSSM() ([]*ec2.Subnet, error)

func GetTestSession

func GetTestSession(c *SessionConfig) (*session.Session, error)

func GetVPCIDFromSubnet

func GetVPCIDFromSubnet(subnetID string) (string, error)

GetVPCIDFromSubnet returns the VPC ID for a given subnet ID

func InferPortByHost

func InferPortByHost(host string) (int, error)

InferPortByHost finds the remote port of a service (RDS, ElastiCache, OpenSearch) by matching its endpoint hostname.

func InitAWSClients

func InitAWSClients(app *config.Atun)

func ListInstancesWithTags

func ListInstancesWithTags(tags map[string]string) ([]*ec2.Instance, error)

ListInstancesWithTag returns a list of EC2 instances with a specific tag

func NewEC2Client

func NewEC2Client(awsConfig aws.Config) (*ec2.EC2, error)

func NewRDSClient

func NewRDSClient(awsConfig aws.Config) (*rds.RDS, error)

func NewSTSClient

func NewSTSClient(awsConfig aws.Config) (*sts.STS, error)

func SendSSHPublicKey

func SendSSHPublicKey(instanceID string, publicKey string, bastionHostUser string) error

func WaitForInstanceReady

func WaitForInstanceReady(instanceID string) error

Types

type SessionConfig

type SessionConfig struct {
	Region      string
	Profile     string
	EndpointUrl string
}

Jump to

Keyboard shortcuts

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