package
0.0.0-20230720030545-d0fd1ebe83fa
Repository: https://github.com/afeeblechild/aws-go-tool.git
Documentation: pkg.go.dev
# Functions
Assumes the role of the given arn with the instance profile and returns a session into the account associated with the arn.
Assumes the role of the specified profile.
No description provided by the author
CreateFile will create a file with a given nameIt will check to ensure that it does not overwrite a file with the same name.
Will generate a password with length of n using a custom random password generator.
GetAccountId will get the account ID for the profile currently in use for the session.
GetIPGeoLocation will use api.hackertarget.com to find the location of an IP.
This is a helper func to load the ~/.aws/config file.
Helper function to print to stdout and the log file.
This will create a new directory with the given path relative to where the script was run from.
No description provided by the author
ParseELBLog will parse an elb log file and return the relevant detailsWill also check the Geo location of the IP if "geo" is true.
Will take in a struct and print with pretty json.
ReadFile will open a file, and return a string slice with each line as a string.
# Variables
No description provided by the author
# Structs
If AccessType is role, then the Profile needs to be configured in your shared config file ~/.aws/config to use have the assume role config setup Example:
[profile <profile name>]
role_arn = arn:aws:iam::123456789012:role/<role name>
source_profile = <source profile in ~/.aws/credentials>
region = us-east-1
output = json
*/ If AccessType is profile, then it will just use the profile in your shared credential file ~/.aws/credentials.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author