02/14/2023, 9:00 AM
Hi together, I try to get the the AWS caller identity with Pulumi by using the following line: _AWS_ACCOUNT_ID = pulumi_aws.get_caller_identity().account_id_ But there is a problem with InvokeOptions:
File "/home/marcel/.cache/pypoetry/virtualenvs/moneymeets-pulumi-2nIJVDlj-py3.11/lib/python3.11/site-packages/pulumi_aws/", line 100, in get_caller_identity
        opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    AttributeError: type object 'InvokeOptions' has no attribute 'merge'
It was working with older versions. I’ve upgraded all my packages and it is not working anymore. I’m using the following versions: • Python 3.11 • Pulumi 3.54.0 • pulumi_aws 5.29.1 Problematic line: Perhaps it is enough to update to provider? Any ideas?


02/14/2023, 10:31 AM
Are you sure the pulumi lib is updated in your environment, we added
quite a while a go.
Since v3.35 based on git log, I'd double check that pulumi is actually at 3.54


02/14/2023, 10:39 AM
Will check that again, by removing my Poetry virtual env and create everything from scratch.
Okay, I see the problem. You are right, Pulumi version 3.33.1 is installed in my Poetry virtual env, because I pinned protobof to 3.20 because of the error:
TypeError: Descriptors cannot not be created directly.
    If this call came from a file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
    If you cannot immediately regenerate your protos, some other possible workarounds are:
     1. Downgrade the protobuf package to 3.20.x or lower.
     2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
    More information: <>

    error: an unhandled error occurred: program exited with non-zero exit code: 1
Okay solution: I’ve pinned protobuf to 3.20.3 and this works. Thanks!