is the only way to specify default credentials for...
# aws
n
is the only way to specify default credentials for the AWS provider to use env vars or
.aws/credentials
?
m
Here's an example of an AWS_ACCESS_KEY_ID not existing in the environment and using a profile that's been defined in the Pulumi Stack config YAML
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const awsConfig = new pulumi.Config("aws");

if (!process.env.AWS_ACCESS_KEY_ID) {
  aws.sdk.config.credentials = new aws.sdk.SharedIniFileCredentials({ profile: awsConfig.get("profile") });
}