docs/sf/providers/aws/cli-reference/login-aws.md
The login aws command authenticates with AWS using browser-based authentication. This generates short-lived credentials backed by your AWS Console session, without requiring the AWS CLI.
serverless login aws
--aws-profile - AWS profile name to configure (defaults to default)--region or -r - AWS region to configureLogin and configure the default profile:
serverless login aws
Login with a specific profile and region:
serverless login aws --aws-profile myprofile --region us-west-2
~/.aws/login/cache/~/.aws/config) is updated with a login_session referenceNote: Sessions expire after 12 hours. Run
serverless login awsagain to refresh your credentials.