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

limited-dog-75903

09/11/2021, 12:04 PM
Hi folks, is there a way to read a file in an EC2 instance after provisioning it? I want to upload this file to a S3 bucket then
b

billowy-army-68599

09/11/2021, 6:55 PM
you can do it with a dynamic provider, but I would do this using EC2 user data
l

limited-dog-75903

09/12/2021, 1:07 AM
@billowy-army-68599 Thanks for the suggestion, by the way, is there a way for Pulumi to wait for userdata to finish? So I can know if the file in S3 exists
s

steep-sunset-89396

09/13/2021, 5:21 AM
Not that I can think of. Once the instance is provisioned, it's up to AWS to do the work and AWS doesn't notify back when the instance becomes available. You would have to create your own logic for that.
l

limited-dog-75903

09/13/2021, 10:58 PM
Yes. Finally, I went to implement my own one by letting userdata upload something in S3, and then I keep checking that in S3