d

    damp-shampoo-64892

    3 months ago
    hey all, Pulumi beginner here attempting to deploy to AWS S3 using Python Pulumi SDK. getting the error pulumi.automation.errors.InlineSourceRuntimeError when running
    stack = auto.create_stack($$$_STUFF_$$$); stack.up()
    , have attached screenshot with more detail. it mentions "python inline source runtime error: unexpected input of type TextIOWrapper" but not sure what this means, have tried tweaking a few things but error remains, now i'm rather lost. any help much appreciated, thanks!
    e

    echoing-dinner-19531

    3 months ago
    Your pulumi program is trying to pass a
    TextIOWrapper
    to something that's probably expecting a
    str
    . I'd check what parameters your passing in the resource constructors
    d

    damp-shampoo-64892

    3 months ago
    thanks, that's right, turns out the problem was that i was passing this as the policy argument to the s3.Bucket constructor:
    (lambda path: open(path))('policy.json')
    when it should have been
    (lambda path: open(path).read())('policy.json')