For those wondering, I was attempting to use the invoke method on an aws.sdk.Lambda service object, but the problem was that I was instantiating this outside of the lambda in the pulumi code, hence it was using a service object constructed by the provider user. Moving the call to instantiate inside of the lambda fixed this.