https://pulumi.com logo
#getting-started
Title
# getting-started
d

damp-shampoo-64892

06/14/2022, 12:10 PM
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

06/14/2022, 12:30 PM
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

06/14/2022, 1:02 PM
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')
10 Views