Location for aws credential file in your machine
~/.aws
In Windows machine file path for credential file is C:\Users\.aws. Make sure .aws folder is not hidden
Credential information inside the credential file in .aws directory
[default]
aws_access_key_id = xxxxxxxxx
aws_secret_access_key = yyyyy
[qa]
aws_access_key_id = xxxxxxxxx
aws_secret_access_key = yyyyy
[prod]
aws_access_key_id = xxxxxxxxx
aws_secret_access_key = yyyyy
You can manually add multiple profiles [dev/test/preprod/qa] in the following file.
Also you can add aws profile using the following command when aws cli is installed in your machine.
aws configure --profile prod
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: ENTER
In order to deploy serverless in AWS, use the following command
serverless deploy //Use default profile and proceed deployment
serverless deploy --aws-profile qa //Deploy in QA environment
serverless deploy --aws-profile prod //Deploy in Production environment
For more detailed information about serverless deployment, kindly go through the following documentation Serverless Deployment