Open bjorg opened 5 years ago
Such feature would be exceptionally helpful!!!
Hey @rhboyd, any plans for this? 🤗
Shocked that this isn't supported after 7 years... also sadly not shocked, more like resigned.
~sigh~
WOW
Code Snippet to enable the feature using AwsCustomResource:
addRequesterPaysToS3Bucket(prefix: string, stage: string, region: string, bucket: IBucket): AwsCustomResource {
// AWSSDKCall to apply to onCreate and onUpdate
const addRequestPay = {
action: 'putBucketRequestPayment',
region: region,
service: `S3`,
parameters: {
Bucket: bucket.bucketName,
RequestPaymentConfiguration: {
Payer: `Requester`
}
},
physicalResourceId: PhysicalResourceId.of(bucket.bucketName)
}
const awsCustomResource = new AwsCustomResource(this, `${prefix}-RequesterPaysCustomResource-${stage}`, {
policy: AwsCustomResourcePolicy.fromSdkCalls({
resources: [bucket.bucketArn]
}),
onCreate: addRequestPay,
onUpdate: addRequestPay
});
awsCustomResource.node.addDependency(bucket)
return awsCustomResource
}
1. Title
AWS::S3::Bucket-RequesterPays
2. Scope of request
Enable CloudFormation to set the Requester Pays property on an S3 bucket. Currently, this property can only be set by the AWS console and AWS SDK.
3. Expected behavior
5. Helpful Links to speed up research and evaluation
6. Category