< Back
Get-AWSToken
Post
NAME Get-AWSToken
SYNOPSIS
Gets an AWS token via STS.
SYNTAX
Get-AWSToken -OktaAppURI <String> [-RoleARN <String>] [-PrincipalARN <String>] [-Credential <PSCredential>]
[-MFAType <String>] [-MFACode <String>] [-STSEndpoint <String>] [<CommonParameters>]
DESCRIPTION
Gets an AWS token via STS. Tokens are suitable for use in API
calls, including use of AWS CLI. By default token data is written
to environment variables.
PARAMETERS
-OktaAppURI <String>
The full URI to the Okta app instance. This is the URI one would
navigate to if clicking on the application instance in the Okta
portal.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RoleARN <String>
Full ARN of the AWS role to assume.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PrincipalARN <String>
Full ARN of the AWS-integrated Identity Provider to use.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Required? false
Position? named
Default value ( Get-Credential )
Accept pipeline input? false
Accept wildcard characters? false
-MFAType <String>
Required? false
Position? named
Default value push
Accept pipeline input? false
Accept wildcard characters? false
-MFACode <String>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-STSEndpoint <String>
Required? false
Position? named
Default value https://sts.amazonaws.com/
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-AWSToken -Profile MyProfile
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-AWSToken `
-OktaAppURI 'https://mycompany.okta.com/home/SomeApp/AppID/Instance' `
-RoleARN 'arn:aws:iam::XXXXXXXXXXXX:role/RoleToAssume' `
-PrincipalARN 'arn:aws:iam::XXXXXXXXXXXX:saml-provider/MySAMLProvider'
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-AWSToken -OktaAppURI 'https://mycompany.okta.com/home/SomeApp/AppID/Instance'
RELATED LINKS
https://github.com/bad2beef/AWSLogin
SYNOPSIS
Gets an AWS token via STS.
SYNTAX
Get-AWSToken -OktaAppURI <String> [-RoleARN <String>] [-PrincipalARN <String>] [-Credential <PSCredential>]
[-MFAType <String>] [-MFACode <String>] [-STSEndpoint <String>] [<CommonParameters>]
DESCRIPTION
Gets an AWS token via STS. Tokens are suitable for use in API
calls, including use of AWS CLI. By default token data is written
to environment variables.
PARAMETERS
-OktaAppURI <String>
The full URI to the Okta app instance. This is the URI one would
navigate to if clicking on the application instance in the Okta
portal.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RoleARN <String>
Full ARN of the AWS role to assume.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PrincipalARN <String>
Full ARN of the AWS-integrated Identity Provider to use.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Required? false
Position? named
Default value ( Get-Credential )
Accept pipeline input? false
Accept wildcard characters? false
-MFAType <String>
Required? false
Position? named
Default value push
Accept pipeline input? false
Accept wildcard characters? false
-MFACode <String>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-STSEndpoint <String>
Required? false
Position? named
Default value https://sts.amazonaws.com/
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-AWSToken -Profile MyProfile
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-AWSToken `
-OktaAppURI 'https://mycompany.okta.com/home/SomeApp/AppID/Instance' `
-RoleARN 'arn:aws:iam::XXXXXXXXXXXX:role/RoleToAssume' `
-PrincipalARN 'arn:aws:iam::XXXXXXXXXXXX:saml-provider/MySAMLProvider'
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-AWSToken -OktaAppURI 'https://mycompany.okta.com/home/SomeApp/AppID/Instance'
RELATED LINKS
https://github.com/bad2beef/AWSLogin