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

magnificent-apartment-79511

01/16/2024, 5:30 PM
In AWS classic, the documentation recommends using
aws.iam.getPolicyDocumentOutput()
to create a S3 Bucket Policy that can be fed to
aws.s3.BucketPolicy
. Is there a similar method in AWS native for creating a bucket policy document? I see there is
<http://awsNative.am|awsNative.am>.getUserPolicyOutput()
but the arguments require a policy name, so I don't think that is the right method. I assume I could use AWS classic and use it's method, but I wanted to see if I could avoid that do everything in native.
l

little-cartoon-10569

01/16/2024, 8:40 PM
You can use the PolicyDocument type from aws, and avoid outputs entirely. The outputs in the object get handled inline, so you don't need to build a wrapping output.
m

magnificent-apartment-79511

01/16/2024, 8:45 PM
Is that only in aws classic?
l

little-cartoon-10569

01/16/2024, 8:47 PM
The class is in classic, but it should work in native (I hope?).
m

magnificent-apartment-79511

01/16/2024, 8:47 PM
Ok, thank you