This message was deleted.
# python
s
This message was deleted.
f
Is the
arn
always
arn:aws:s3:::bucket_name
?
The other way might be to “apply” the
arn
similar to this
Copy code
<https://github.com/pulumi/examples/blob/master/aws-py-assume-role/create-role/__main__.py#L41>
s
Copy code
bucket = aws.s3.Bucket("name")
arn = bucket.arn
g
You do need to apply the arn if you're building out the entire bucket policy json. Here's an example - https://github.com/pulumi/examples/blob/ec43670866809bfd64d3a39f68451f957d3c1e1d/aws-py-s3-folder/__main__.py#L21-L39.
q
I found a way to do it yesterday:
Copy code
policy = bucket.id.apply(lambda id:
            '''
            {{
...
               "Resource": "arn:aws:s3:::{my_id}/*"
...
'''.format(my_id=id)...