aws configure command without --profile, it saves credentials under the _ profile.aws configure --profile dev-account, it saves credentials under _ profile.Run command aws s3 ls but for the “dev-account” profile.
aws s3 ls --profile dev-account
You want all aws commands in your current shell session to use a specific profile: “dev-account”. How will you set the environment variable temporarily and later unset?
To set:
export AWS_PROFILE=dev-account
To unset:
unset AWS_PROFILE
How to check which profile is active?
echo $AWS_PROFILE
How to configure aws cli with credentials?
aws configure
This stores your credentials (aws_access_key_id & aws_secret_access_key) profile-wise in ~/.aws/credentials and your region & output settings profile-wise in ~/.aws/config.
How to check/confirm that your CLI is correctly authenticated (without opening the AWS Management Console)?
aws sts get-caller-identity
it returns a JSON object with your Account and ARN
State File Integrity: Terraform uses a _ file to map your code to real-world AWS resources. If two people change the code at once without a shared state, the file becomes corrupted, leading to resource _ .
.
terraform.tfstate