Does the Pulumi CLI work directly with temporary c...
# aws
c
Does the Pulumi CLI work directly with temporary credentials that are provided by STS? Or do I need to write something to wrap the credentials that aws`sts assume-role` generates?
s
@colossal-plastic-46140 Depends. It works using
aws-vault
which sets the temporary credentials in the correct environment variables what the
aws-sdk-go
expects.
c
Cool thats what I thought, just wanted to doublecheck
s
If you use the AWS CLI, you best set a named profile in the config file https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html & reference this profile either via
AWS_PROFILE
env or
pulumi config set aws:profile
(see https://www.pulumi.com/docs/get-started/aws/configure/).
The JSON output from
aws sts assume-role
must be put in the correct environment variables, though: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
c
perfect thats what I needed
w
Al of the above works - but note that you can also do something like https://github.com/pulumi/examples/blob/master/aws-ts-assume-role/assume-role/index.ts to directly assume a role without the need for external tools.
s
Would Pulumi also prompt for the MFA code?