acceptable-army-69872
03/05/2021, 7:00 PMnew Provider
which doesn't automatically pick up the profile set by config set aws:profile blah
const aws_config = new pulumi.Config('aws');
const awsUsEast1 = new Provider("usEast1", { region: "us-east-1", profile: aws_config.require('profile')});
const sslCert = new Certificate("sslCert", {
domainName: domain,
validationMethod: "DNS",
}, { provider: awsUsEast1 });
broad-dog-22463
03/05/2021, 7:14 PMconst providers: {[key: string]: aws.Provider} = {
"us-east-1": new aws.Provider("us-east-1", {region: "us-east-1"}),
"us-east-2": new aws.Provider("us-east-2", {region: "us-east-2"}),
"us-west-2": new aws.Provider("us-west-2", {region: "us-west-2"}),
"eu-west-1": new aws.Provider("eu-west-1", {region: "eu-west-1"}),
"eu-west-2": new aws.Provider("eu-west-2", {region: "eu-west-2"}),
};
for (const providerKey of Object.keys(providers)) {
const provider = providers[providerKey];
const lambda = new aws.lambda.Function(`my-lambda-function-${providerKey}`, {
name: "sample-lambda",
runtime: aws.lambda.Go1dxRuntime,
timeout: 900,
role: lambdaRole.arn,
handler: "main",
memorySize: 1024,
code: new pulumi.asset.FileArchive("deployment.zip"),
environment: {
variables: {
"DESTROY_ENABLED": "true"
}
},
}, {provider});
}
acceptable-army-69872
03/05/2021, 7:18 PMerror: unable to discover AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration
errors.broad-dog-22463
03/05/2021, 7:21 PMacceptable-army-69872
03/05/2021, 7:21 PM