This is running inside a container - why would I b...
# aws
m
This is running inside a container - why would I be getting this error? Not sure where to start debugging this?
b
are the env vars also present inside the container?
m
Yes - so it works fine if I comment out this part:
Copy code
const { accountId: awsAccountId } = await aws.getCallerIdentity({})
I also have
PULUMI_ACCESS_TOKEN
set as env and that seems to work fine for logging into Pulumi - just aws credentials are having issues
Any known issues you’ve heard of that might be causing this?
b
can you show me your imports?
m
Imports??
Copy code
import * as pulumi from '@pulumi/pulumi'
import * as aws from '@pulumi/aws'
import * as awsx from '@pulumi/awsx'
import * as k8s from '@pulumi/kubernetes'
Copy code
"dependencies": {
        "@pulumi/aws": "^5.10.0",
        "@pulumi/awsx": "^0.40.0",
        "@pulumi/kubernetes": "^3.20.2",
        "@pulumi/pulumi": "^3.37.2",
    }
l
We’re also facing this issue, but in our case it’s only happening after upgrading pulumi-aws from >=4.0,<5.0 to >=5.0. We’re also using environment variables for aws creds.
r
would any of you by any chance be using IAM roles?
w
@rhythmic-branch-12845 we have added permissions by group
l
Switching to using the ~/.aws/credentials file (instead of env vars) fixes the problem. This is with the exact same creds.