Try AWS Native preview for resources not in the classic version.
aws.s3.BucketPublicAccessBlock
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages S3 bucket-level Public Access Block configuration. For more information about these settings, see the AWS S3 Block Public Access documentation.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleBucketV2 = new Aws.S3.BucketV2("exampleBucketV2");
var exampleBucketPublicAccessBlock = new Aws.S3.BucketPublicAccessBlock("exampleBucketPublicAccessBlock", new()
{
Bucket = exampleBucketV2.Id,
BlockPublicAcls = true,
BlockPublicPolicy = true,
IgnorePublicAcls = true,
RestrictPublicBuckets = true,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleBucketV2, err := s3.NewBucketV2(ctx, "exampleBucketV2", nil)
if err != nil {
return err
}
_, err = s3.NewBucketPublicAccessBlock(ctx, "exampleBucketPublicAccessBlock", &s3.BucketPublicAccessBlockArgs{
Bucket: exampleBucketV2.ID(),
BlockPublicAcls: pulumi.Bool(true),
BlockPublicPolicy: pulumi.Bool(true),
IgnorePublicAcls: pulumi.Bool(true),
RestrictPublicBuckets: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketPublicAccessBlock;
import com.pulumi.aws.s3.BucketPublicAccessBlockArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleBucketV2 = new BucketV2("exampleBucketV2");
var exampleBucketPublicAccessBlock = new BucketPublicAccessBlock("exampleBucketPublicAccessBlock", BucketPublicAccessBlockArgs.builder()
.bucket(exampleBucketV2.id())
.blockPublicAcls(true)
.blockPublicPolicy(true)
.ignorePublicAcls(true)
.restrictPublicBuckets(true)
.build());
}
}
import pulumi
import pulumi_aws as aws
example_bucket_v2 = aws.s3.BucketV2("exampleBucketV2")
example_bucket_public_access_block = aws.s3.BucketPublicAccessBlock("exampleBucketPublicAccessBlock",
bucket=example_bucket_v2.id,
block_public_acls=True,
block_public_policy=True,
ignore_public_acls=True,
restrict_public_buckets=True)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleBucketV2 = new aws.s3.BucketV2("exampleBucketV2", {});
const exampleBucketPublicAccessBlock = new aws.s3.BucketPublicAccessBlock("exampleBucketPublicAccessBlock", {
bucket: exampleBucketV2.id,
blockPublicAcls: true,
blockPublicPolicy: true,
ignorePublicAcls: true,
restrictPublicBuckets: true,
});
resources:
exampleBucketV2:
type: aws:s3:BucketV2
exampleBucketPublicAccessBlock:
type: aws:s3:BucketPublicAccessBlock
properties:
bucket: ${exampleBucketV2.id}
blockPublicAcls: true
blockPublicPolicy: true
ignorePublicAcls: true
restrictPublicBuckets: true
Create BucketPublicAccessBlock Resource
new BucketPublicAccessBlock(name: string, args: BucketPublicAccessBlockArgs, opts?: CustomResourceOptions);
@overload
def BucketPublicAccessBlock(resource_name: str,
opts: Optional[ResourceOptions] = None,
block_public_acls: Optional[bool] = None,
block_public_policy: Optional[bool] = None,
bucket: Optional[str] = None,
ignore_public_acls: Optional[bool] = None,
restrict_public_buckets: Optional[bool] = None)
@overload
def BucketPublicAccessBlock(resource_name: str,
args: BucketPublicAccessBlockArgs,
opts: Optional[ResourceOptions] = None)
func NewBucketPublicAccessBlock(ctx *Context, name string, args BucketPublicAccessBlockArgs, opts ...ResourceOption) (*BucketPublicAccessBlock, error)
public BucketPublicAccessBlock(string name, BucketPublicAccessBlockArgs args, CustomResourceOptions? opts = null)
public BucketPublicAccessBlock(String name, BucketPublicAccessBlockArgs args)
public BucketPublicAccessBlock(String name, BucketPublicAccessBlockArgs args, CustomResourceOptions options)
type: aws:s3:BucketPublicAccessBlock
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketPublicAccessBlockArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BucketPublicAccessBlockArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BucketPublicAccessBlockArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketPublicAccessBlockArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketPublicAccessBlockArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BucketPublicAccessBlock Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The BucketPublicAccessBlock resource accepts the following input properties:
- Bucket string
S3 Bucket to which this Public Access Block configuration should be applied.
- Block
Public boolAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- Block
Public boolPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- Ignore
Public boolAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- Restrict
Public boolBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- Bucket string
S3 Bucket to which this Public Access Block configuration should be applied.
- Block
Public boolAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- Block
Public boolPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- Ignore
Public boolAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- Restrict
Public boolBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- bucket String
S3 Bucket to which this Public Access Block configuration should be applied.
- block
Public BooleanAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- block
Public BooleanPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- ignore
Public BooleanAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- restrict
Public BooleanBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- bucket string
S3 Bucket to which this Public Access Block configuration should be applied.
- block
Public booleanAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- block
Public booleanPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- ignore
Public booleanAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- restrict
Public booleanBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- bucket str
S3 Bucket to which this Public Access Block configuration should be applied.
- block_
public_ boolacls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- block_
public_ boolpolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- ignore_
public_ boolacls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- restrict_
public_ boolbuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- bucket String
S3 Bucket to which this Public Access Block configuration should be applied.
- block
Public BooleanAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- block
Public BooleanPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- ignore
Public BooleanAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- restrict
Public BooleanBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketPublicAccessBlock resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing BucketPublicAccessBlock Resource
Get an existing BucketPublicAccessBlock resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BucketPublicAccessBlockState, opts?: CustomResourceOptions): BucketPublicAccessBlock
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
block_public_acls: Optional[bool] = None,
block_public_policy: Optional[bool] = None,
bucket: Optional[str] = None,
ignore_public_acls: Optional[bool] = None,
restrict_public_buckets: Optional[bool] = None) -> BucketPublicAccessBlock
func GetBucketPublicAccessBlock(ctx *Context, name string, id IDInput, state *BucketPublicAccessBlockState, opts ...ResourceOption) (*BucketPublicAccessBlock, error)
public static BucketPublicAccessBlock Get(string name, Input<string> id, BucketPublicAccessBlockState? state, CustomResourceOptions? opts = null)
public static BucketPublicAccessBlock get(String name, Output<String> id, BucketPublicAccessBlockState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Block
Public boolAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- Block
Public boolPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- Bucket string
S3 Bucket to which this Public Access Block configuration should be applied.
- Ignore
Public boolAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- Restrict
Public boolBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- Block
Public boolAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- Block
Public boolPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- Bucket string
S3 Bucket to which this Public Access Block configuration should be applied.
- Ignore
Public boolAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- Restrict
Public boolBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- block
Public BooleanAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- block
Public BooleanPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- bucket String
S3 Bucket to which this Public Access Block configuration should be applied.
- ignore
Public BooleanAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- restrict
Public BooleanBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- block
Public booleanAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- block
Public booleanPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- bucket string
S3 Bucket to which this Public Access Block configuration should be applied.
- ignore
Public booleanAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- restrict
Public booleanBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- block_
public_ boolacls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- block_
public_ boolpolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- bucket str
S3 Bucket to which this Public Access Block configuration should be applied.
- ignore_
public_ boolacls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- restrict_
public_ boolbuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
- block
Public BooleanAcls Whether Amazon S3 should block public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect existing policies or ACLs. When set totrue
causes the following behavior:- PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access.
- PUT Object calls will fail if the request includes an object ACL.
- block
Public BooleanPolicy Whether Amazon S3 should block public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the existing bucket policy. When set totrue
causes Amazon S3 to:- Reject calls to PUT Bucket policy if the specified bucket policy allows public access.
- bucket String
S3 Bucket to which this Public Access Block configuration should be applied.
- ignore
Public BooleanAcls Whether Amazon S3 should ignore public ACLs for this bucket. Defaults to
false
. Enabling this setting does not affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set. When set totrue
causes Amazon S3 to:- Ignore public ACLs on this bucket and any objects that it contains.
- restrict
Public BooleanBuckets Whether Amazon S3 should restrict public bucket policies for this bucket. Defaults to
false
. Enabling this setting does not affect the previously stored bucket policy, except that public and cross-account access within the public bucket policy, including non-public delegation to specific accounts, is blocked. When set totrue
:- Only the bucket owner and AWS Services can access this buckets if it has a public policy.
Import
Using pulumi import
, import aws_s3_bucket_public_access_block
using the bucket name. For example:
$ pulumi import aws:s3/bucketPublicAccessBlock:BucketPublicAccessBlock example my-bucket
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.