https://pulumi.com logo
Title
b

billions-orange-71472

06/16/2021, 4:01 PM
Hello, everyone.I've got an issue, so let me ask a question. To create AWS resources, I tried to perform
pulumi up
on an EC2 instance via instance profile with AdministratorAccess policy attached.I encountered following error when exec.
Previewing update (main)

View Live: <https://app.pulumi.com/xxxxxx/pulumi-go/main/previews/866e47e5-b3e3-45c4-85e7-14478267abea>
:
Diagnostics:
  aws:iam:Role (sample-role):
    error: 1 error occurred:
        * error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.
    
    Please see <https://registry.terraform.io/providers/hashicorp/aws>
    for more information about providing credentials.
    
    Error: NoCredentialProviders: no valid providers in chain. Deprecated.
        For verbose messaging see aws.Config.CredentialsChainVerboseErrors
After I created IAM user to generate AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY and configured to ~/.aws/credentials, It worked properly. Sorry to ask such a basic question, but can' I perform 'pulumi up' with instance profile??
b

bumpy-grass-54508

06/16/2021, 4:25 PM
if you are running pulumi in EC2 you'll need to set
skipMetadataApiCheck
to false wherever you are creating your aws provider, or make sure that is set in your pulumi config for the default aws provider https://github.com/pulumi/pulumi-aws/issues/1359
b

billions-orange-71472

06/16/2021, 4:29 PM
@bumpy-grass-54508 Thanks David!! I'll try to set up
skipMetadataApiCheck
according to this issue.😄
b

bumpy-grass-54508

06/16/2021, 4:30 PM
No problem 👍