Example 1
Invoke-AWSLogin
Logs in using the default profile and region determined by AWS configuration. The cmdlet will launch a browser for authentication.
Example 2
Invoke-AWSLogin -ProfileName "aws-login-test-profile" -Region "us-west-2"
Logs in using a specific profile named "aws-login-test-profile" in the us-west-2 region. The login session will be cached and associated with this profile.
Example 3
Invoke-AWSLogin -ProfileName "aws-login-test-profile" -Region "us-east-1" -Remote
Logs in using cross-device authentication flow without launching a browser. This is useful for headless environments or when a browser cannot be launched. You will receive a URL to visit in a browser and a verification code to enter.