https://pulumi.com logo
#aws
Title
# aws
m

most-lighter-95902

07/30/2022, 11:16 PM
This is running inside a container - why would I be getting this error? Not sure where to start debugging this?
b

billowy-army-68599

07/31/2022, 12:11 AM
are the env vars also present inside the container?
m

most-lighter-95902

07/31/2022, 1:12 AM
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

billowy-army-68599

07/31/2022, 1:42 AM
can you show me your imports?
m

most-lighter-95902

07/31/2022, 1:42 AM
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

limited-rain-96205

07/31/2022, 10:00 PM
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

rhythmic-branch-12845

08/01/2022, 1:59 PM
would any of you by any chance be using IAM roles?
w

white-train-9300

08/02/2022, 12:33 AM
@rhythmic-branch-12845 we have added permissions by group
l

limited-rain-96205

08/04/2022, 3:48 PM
Switching to using the ~/.aws/credentials file (instead of env vars) fixes the problem. This is with the exact same creds.
3 Views