Package: awsgen
awsgenawsgen is the software that manage AWS Security Token Service (STS) and enables you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users that you authenticate (federated users).
For more detailed information about using this service, go toTemporary Security Credentials.Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.PrerequisitesYou will need to have python and pip installed on your machine.On Linux (Debian/Ubuntu)$ sudo apt-get install python python-pip -yRight after having it installed you'll need to get aws-cli and aws-gen.$ sudo pip install awscli awsgen --upgrade --no-cache-dirOn WindowsFor install python go toPython.orgRight after having it installed you'll need to get aws-cli and aws-gen.> pip install awscli awsgen --upgrade --no-cache-dirOn MacOS (under construction)Please add instructions hereInstallingFirst you need to create an account with aws (please go toAmazon Website)Go to the terminal and create a new AWS profile using the following command:$ aws-gen configure \
            --account AWS_ACCOUNT \
            --trust-role-arn TRUSTROLEARN \
            --access-key-id AWS_ACCESS_KEY_ID \
            --secret-access-key AWS_SECRET_ACCESS_KEYParameters:AWS_ACCOUNT: stands for the main name of your project or brand, i.e.brand-projectorlittleBanana-tree. This is important because it will link with your profile later.TRUSTROLEARN: Role you need to create with a Superadmin user allowing you do whatever you need. This role will give the properly permissions to run builds, create/update/delete cloudformation, create new services on AWS, etc.AWS_ACCESS_KEY_ID: stands for the access key you will get once you create a user.AWS_SECRET_ACCESS_KEY: stands for the secret key you will have once you create your user.After configuring it, you need to create a profile:$ aws-gen create-profile \
            --account AWS_ACCOUNT \
            --profile AWS_PROFILE \
            --region-name AWS_REGION \
            --output AWS_OUTPUTParameters:AWS_REGION: stands for the region you mostly use on your account, where your infrastructure relies.AWS_OUTPUT: We usually use JSON as output format, but there are other options you can explore.AWS_PROFILE: stands for the profile name you want to use. It is important to keep the things organized, so we would recomend to name it follwing the standardusername@AWS_ACCOUNT, i.e.aboscatto@brand-projectordanielpn@littleBanana-tree.UsingGenerating an authenticaded AWS console linkIf you need to access the AWS Console using theTRUSTROLEARNrole, please do the following:$ aws-gen get-link --account AWS_ACCOUNT --profile AWS_PROFILEParameters:AWS_ACCOUNT: stands for the main name of your project or brand, i.e.brand-projectorlittleBanana-tree. This is important because it will link with your profile later.AWS_PROFILE: stands for the profile name you want to use. It is important to keep the things organized, so we would recomend to name it follwing the standardusername@AWS_ACCOUNT, i.e.aboscatto@brand-projectordanielpn@littleBanana-tree.Generating temporary AWS Access keyIf you need to access the AWS using access key over theTRUSTROLEARNrole, please do the following:$ aws-gen get-key --account AWS_ACCOUNT --profile AWS_PROFILEParameters:AWS_ACCOUNT: stands for the main name of your project or brand, i.e.brand-projectorlittleBanana-tree. This is important because it will link with your profile later.AWS_PROFILE: stands for the profile name you want to use. It is important to keep the things organized, so we would recomend to name it follwing the standardusername@AWS_ACCOUNT, i.e.aboscatto@brand-projectordanielpn@littleBanana-tree.Output:AWS_ACCESS_KEY_ID: The access key ID that identifies the temporary security credentials.AWS_SECRET_ACCESS_KEY: The secret access key that can be used to sign requests.AWS_SESSION_TOKEN: The token that users must pass to the service API to use the temporary credentials.Setting active profileIf you need active profile default, please do the following:$ aws-gen set-active-profile --profile AWS_PROFILEParameters:AWS_PROFILE: stands for the profile name you want to use. It is important to keep the things organized, so we would recomend to name it follwing the standardusername@AWS_ACCOUNT, i.e.aboscatto@brand-projectordanielpn@littleBanana-tree.Getting active profileIf you need get active profile, please do the following:$ aws-gen get-active-profileListing profilesIf you need list profiles, please do the following:$ aws-gen list-profilesDeploying with ServerlessDoing the deploy with Serverless should be pretty simple and you need to use the --aws-profile parameter$ sls deploy --aws-profile AWS_PROFILEUsing aws cliDoing the use with aws cli should be pretty simple and you need to use the --profile parameter$ aws s3 ls --profile AWS_PROFILEStep-by-step exampleHere is an example of how it should look like during the installing:$ sudo apt-get install python python-pip -y$ sudo pip install awscli awsgen --upgrade --no-cache-dir$ aws-gen configure \
            --account brand-project \
            --trust-role-arn arn:aws:iam::123456789123:role/AWSTrustUserRole \
            --access-key-id AK***************KQ \
            --secret-access-key Y*********************0*******P*******S$ aws-gen create-profile \
            --account brand-project \
            --profile aboscatto@brand-project \
            --region-name us-west-2 \
            --output jsonContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.VersioningWe useGitHubfor versioning. For the versions available, see thetags on this repository.AuthorsMarcos Vallim-Initial work, Test, Documentation-mvallimAndré Boscatto-Validation use, Test, Documentation-andreboscattoKalianne Rosa-Validation use, Test-kaliannerosaDaniel Nunes-Validation use, Test-daspnSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the BSD License - see theLICENSEfile for detailsAcknowledgments (under construction)Hat tip to anyone whose code was usedInspirationetcCode of ConductEveryone interacting in the awsgen project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow thePyPA Code of Conduct.