https://pulumi.com logo
#general
Title
# general
k

kind-ambulance-33034

05/28/2019, 11:34 PM
Hi guys I am trying the demo to deploy a site using s3, it works like a charm but now sure what are the required adjustments when I want to deploy a more realistic site, for example a folder with other directorios inside like images, js, css, etc. I am getting the following error in this case:
Copy code
Error: failed to register new resource media [aws:s3/bucketObject:BucketObject]: 2 UNKNOWN: failed to compute asset hash: asset path 'www/static/media' is a directory; try using an archive
        at Object.registerResource
w

white-balloon-205

05/28/2019, 11:53 PM
It sounds like you are trying to create a
BucketObject
from a directory. That won't work, as a
BucketObject
in AWS represents a single file. You would likely need to recursively walk the folder and create
BucketObjects
for each file you find if that is the desired outcome. There's an example of this here that we use for our pulumi.io site infrastructure: https://github.com/pulumi/docs/blob/master/infrastructure/index.ts#L177-L194
k

kind-ambulance-33034

05/29/2019, 2:57 PM
Thanks Luke