aws

package
v0.0.0-...-96389b7 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSSHKeyPair

func CreateSSHKeyPair(sess *session.Session, keyPairName string) (string, error)

func CreateSecurityGroup

func CreateSecurityGroup(svc *ec2.EC2, groupName, description, userIP string) (*ec2.CreateSecurityGroupOutput, error)

CreateSecurityGroup creates a new security group that allows incoming traffic from the user's IP.

func CreateSecurityGroupAndRule

func CreateSecurityGroupAndRule(sess *session.Session, groupName, description, ip string) (string, error)

func InitAWSSession

func InitAWSSession(accessKey, secretKey, region string) *session.Session

initAWSSession initializes an AWS session with the given credentials.

func KeyPairExists

func KeyPairExists(svc *ec2.EC2, keyPairName string) (bool, error)

func LaunchEC2Instance

func LaunchEC2Instance(sess *session.Session, instanceType, region, keyPairName string) (string, error)

launchEC2Instance launches an EC2 instance with the given parameters.

func PrepareUserDataScript

func PrepareUserDataScript() (string, error)

prepareUserDataScript reads the embedded user data script.

func SavePrivateKeyToFile

func SavePrivateKeyToFile(privateKey, filename string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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