

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::S3::AccessPoint
<a name="aws-resource-s3-accesspoint"></a>

The AWS::S3::AccessPoint resource is an Amazon S3 resource type that you can use to access buckets.

## Syntax
<a name="aws-resource-s3-accesspoint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-s3-accesspoint-syntax.json"></a>

```
{
  "Type" : "AWS::S3::AccessPoint",
  "Properties" : {
      "[Bucket](#cfn-s3-accesspoint-bucket)" : String,
      "[BucketAccountId](#cfn-s3-accesspoint-bucketaccountid)" : String,
      "[Name](#cfn-s3-accesspoint-name)" : String,
      "[Policy](#cfn-s3-accesspoint-policy)" : Json,
      "[PublicAccessBlockConfiguration](#cfn-s3-accesspoint-publicaccessblockconfiguration)" : PublicAccessBlockConfiguration,
      "[Tags](#cfn-s3-accesspoint-tags)" : [ Tag, ... ],
      "[VpcConfiguration](#cfn-s3-accesspoint-vpcconfiguration)" : VpcConfiguration
    }
}
```

### YAML
<a name="aws-resource-s3-accesspoint-syntax.yaml"></a>

```
Type: AWS::S3::AccessPoint
Properties:
  [Bucket](#cfn-s3-accesspoint-bucket): String
  [BucketAccountId](#cfn-s3-accesspoint-bucketaccountid): String
  [Name](#cfn-s3-accesspoint-name): String
  [Policy](#cfn-s3-accesspoint-policy): Json
  [PublicAccessBlockConfiguration](#cfn-s3-accesspoint-publicaccessblockconfiguration): 
    PublicAccessBlockConfiguration
  [Tags](#cfn-s3-accesspoint-tags): 
    - Tag
  [VpcConfiguration](#cfn-s3-accesspoint-vpcconfiguration): 
    VpcConfiguration
```

## Properties
<a name="aws-resource-s3-accesspoint-properties"></a>

`Bucket`  <a name="cfn-s3-accesspoint-bucket"></a>
The name of the bucket associated with this access point.  
*Required*: Yes  
*Type*: String  
*Minimum*: `3`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`BucketAccountId`  <a name="cfn-s3-accesspoint-bucketaccountid"></a>
The AWS account ID associated with the S3 bucket associated with this access point.  
*Required*: No  
*Type*: String  
*Pattern*: `^\d{12}$`  
*Maximum*: `64`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-s3-accesspoint-name"></a>
The name of this access point. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the access point name.  
*Required*: No  
*Type*: String  
*Pattern*: `^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$`  
*Minimum*: `3`  
*Maximum*: `50`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Policy`  <a name="cfn-s3-accesspoint-policy"></a>
The access point policy associated with this access point.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PublicAccessBlockConfiguration`  <a name="cfn-s3-accesspoint-publicaccessblockconfiguration"></a>
The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see [The Meaning of "Public"](https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) in the *Amazon S3 User Guide*.   
*Required*: No  
*Type*: [PublicAccessBlockConfiguration](aws-properties-s3-accesspoint-publicaccessblockconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-s3-accesspoint-tags"></a>
An array of tags that you can apply to access points. Tags are key-value pairs of metadata used to categorize your access points and control access. For more information, see [Using tags for attribute-based access control (ABAC)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-s3-accesspoint-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcConfiguration`  <a name="cfn-s3-accesspoint-vpcconfiguration"></a>
The Virtual Private Cloud (VPC) configuration for this access point, if one exists.  
*Required*: No  
*Type*: [VpcConfiguration](aws-properties-s3-accesspoint-vpcconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-s3-accesspoint-return-values"></a>

### Ref
<a name="aws-resource-s3-accesspoint-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the access point name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-s3-accesspoint-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-s3-accesspoint-return-values-fn--getatt-fn--getatt"></a>

`Alias`  <a name="Alias-fn::getatt"></a>
The alias for this access point.

`Arn`  <a name="Arn-fn::getatt"></a>
This property contains the details of the ARN for the access point.

`Name`  <a name="Name-fn::getatt"></a>
The name of this access point.

`NetworkOrigin`  <a name="NetworkOrigin-fn::getatt"></a>
Indicates whether this access point allows access from the internet. If `VpcConfiguration` is specified for this access point, then `NetworkOrigin` is `VPC`, and the access point doesn't allow access from the internet. Otherwise, `NetworkOrigin` is `Internet`, and the access point allows access from the internet, subject to the access point and bucket access policies.  
*Allowed values*: `VPC` \$1 `Internet`

## Examples
<a name="aws-resource-s3-accesspoint--examples"></a>



**Topics**
+ [Create an S3 Access Point](#aws-resource-s3-accesspoint--examples--Create_an_S3_Access_Point)
+ [Create an S3 Access Point restricted to a VPC](#aws-resource-s3-accesspoint--examples--Create_an_S3_Access_Point_restricted_to_a_VPC)

### Create an S3 Access Point
<a name="aws-resource-s3-accesspoint--examples--Create_an_S3_Access_Point"></a>

The following example creates an Amazon S3 access point for the given S3 bucket. This access point allows user `JaneDoe` to make GetObject and PutObject operations only for bucket objects prefixed with `/janedoe`. You must include `/object` in the resource ARN path.

For more information, see [Configuring IAM policies for using access points](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-policies.html) and [Managing and using access points](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) in the *Amazon S3 User Guide*.

#### JSON
<a name="aws-resource-s3-accesspoint--examples--Create_an_S3_Access_Point--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "S3Bucket": {
            "Type": "AWS::S3::Bucket"
        },
        "S3BucketPolicy": {
            "Type": "AWS::S3::BucketPolicy",
            "Properties": {
                "Bucket": {
                    "Ref": "S3Bucket"
                },
                "PolicyDocument": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Action": "*",
                            "Effect": "Allow",
                            "Resource": [
                                {
                                    "Fn::GetAtt": [
                                        "S3Bucket",
                                        "Arn"
                                    ]
                                },
                                {
                                    "Fn::Join": [
                                        "",
                                        [
                                            {
                                                "Fn::GetAtt": [
                                                    "S3Bucket",
                                                    "Arn"
                                                ]
                                            },
                                            "/*"
                                        ]
                                    ]
                                }
                            ],
                            "Principal": {
                                "AWS": "*"
                            },
                            "Condition": {
                                "StringEquals": {
                                    "s3:DataAccessPointAccount": {
                                        "Ref": "AWS::AccountId"
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        },
        "S3AccessPoint": {
            "Type": "AWS::S3::AccessPoint",
            "Properties": {
                "Bucket": {
                    "Ref": "S3Bucket"
                },
                "Name": "my-access-point",
                "Policy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Action": [
                                "s3:GetObject",
                                "s3:PutObject"
                            ],
                            "Effect": "Allow",
                            "Resource": [
                                {
                                    "Fn::Sub": "arn:${AWS::Partition}:s3:${AWS::Region}:${AWS::AccountId}:accesspoint/my-access-point/object/janedoe/*"
                                }
                            ],
                            "Principal": {
                                "AWS": {
                                    "Fn::Sub": "arn:${AWS::Partition}:iam::${AWS::AccountId}:user/JaneDoe"
                                }
                            }
                        }
                    ]
                }
            }
        }
    },
   "Outputs": {
        "S3AccessPointArn": {
            "Value": {
                "Fn::GetAtt": ["S3AccessPoint", "Arn"]
            },
            "Description": "ARN of the sample Amazon S3 access point."
        },
        "S3AccessPointName": {
            "Value": {
                "Fn::GetAtt": ["S3AccessPoint", "Name"]
            },
            "Description": "Name of the sample Amazon S3 access point."
        },
        "S3AccessPointAlias": {
            "Value": {
                "Fn::GetAtt": ["S3AccessPoint", "Alias"]
            },
            "Description": "Alias of the sample Amazon S3 access point."
        }
    }
}
```

#### YAML
<a name="aws-resource-s3-accesspoint--examples--Create_an_S3_Access_Point--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  S3Bucket:
    Type: 'AWS::S3::Bucket'
  S3BucketPolicy:
    Type: 'AWS::S3::BucketPolicy'
    Properties:
      Bucket: !Ref S3Bucket
      PolicyDocument:
        Version: 2012-10-17
        Statement:
          - Action: '*'
            Effect: Allow
            Resource:
              - !GetAtt
                - S3Bucket
                - Arn
              - !Join
                - ''
                - - !GetAtt
                    - S3Bucket
                    - Arn
                  - /*
            Principal:
              AWS: '*'
            Condition:
              StringEquals:
                's3:DataAccessPointAccount': !Ref 'AWS::AccountId'
  S3AccessPoint:
    Type: 'AWS::S3::AccessPoint'
    Properties:
      Bucket: !Ref S3Bucket
      Name: my-access-point
      Policy:
        Version: 2012-10-17
        Statement:
          - Action:
              - 's3:GetObject'
              - 's3:PutObject'
            Effect: Allow
            Resource:
               - !Sub  'arn:${AWS::Partition}:s3:${AWS::Region}:${AWS::AccountId}:accesspoint/my-access-point/object/janedoe/*'
            Principal:
              AWS: !Sub 'arn:${AWS::Partition}:iam::${AWS::AccountId}:user/JaneDoe'
Outputs:
  S3AccessPointArn:
    Value:
      Fn::GetAtt:
      - S3AccessPoint
      - Arn
    Description: ARN of the sample Amazon S3 access point.
  S3AccessPointName:
    Value:
      Fn::GetAtt:
      - S3AccessPoint
      - Name
    Description: Name of the sample Amazon S3 access point.
  S3AccessPointAlias:
    Value:
      Fn::GetAtt:
      - S3AccessPoint
      - Alias
    Description: Alias of the sample Amazon S3 access point.
```

### Create an S3 Access Point restricted to a VPC
<a name="aws-resource-s3-accesspoint--examples--Create_an_S3_Access_Point_restricted_to_a_VPC"></a>

The following example creates an Amazon S3 access point restricted to a virtual private cloud (VPC). For more information, see [Configuring IAM policies for using access points](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-policies.html) in the *Amazon S3 User Guide*.

#### JSON
<a name="aws-resource-s3-accesspoint--examples--Create_an_S3_Access_Point_restricted_to_a_VPC--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "S3Bucket": {
            "Type": "AWS::S3::Bucket"
        },
        "S3BucketPolicy": {
            "Type": "AWS::S3::BucketPolicy",
            "Properties": {
                "Bucket": {
                    "Ref": "S3Bucket"
                },
                "PolicyDocument": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Action": "*",
                            "Effect": "Allow",
                            "Resource": [
                                {
                                    "Fn::GetAtt": [
                                        "S3Bucket",
                                        "Arn"
                                    ]
                                },
                                {
                                    "Fn::Join": [
                                        "",
                                        [
                                            {
                                                "Fn::GetAtt": [
                                                    "S3Bucket",
                                                    "Arn"
                                                ]
                                            },
                                            "/*"
                                        ]
                                    ]
                                }
                            ],
                            "Principal": {
                                "AWS": "*"
                            },
                            "Condition": {
                                "StringEquals": {
                                    "s3:DataAccessPointAccount": {
                                        "Ref": "AWS::AccountId"
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        },
        "VPC": {
            "Type": "AWS::EC2::VPC",
            "Properties": {
                "CidrBlock": "10.0.0.0/16"
            }
        },
        "S3AccessPoint": {
            "Type": "AWS::S3::AccessPoint",
            "Properties": {
                "Bucket": {
                    "Ref": "S3Bucket"
                },
                "Name": "my-access-point",
                "VpcConfiguration": {
                    "VpcId": {
                        "Ref": "VPC"
                    }
                },
                "PublicAccessBlockConfiguration": {
                    "BlockPublicAcls": true,
                    "IgnorePublicAcls": true,
                    "BlockPublicPolicy": true,
                    "RestrictPublicBuckets": true
                }
            }
        }
    },
    "Outputs": {
        "S3AccessPointArn": {
            "Value": {
                "Ref": "S3AccessPoint"
            },
            "Description": "ARN of the sample Amazon S3 access point."
        }
    }
}
```

#### YAML
<a name="aws-resource-s3-accesspoint--examples--Create_an_S3_Access_Point_restricted_to_a_VPC--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
  S3BucketPolicy:
    Type: AWS::S3::BucketPolicy
    Properties:
      Bucket:
        Ref: S3Bucket
      PolicyDocument:
        Version: 2012-10-17
        Statement:
          - Action: "*"
            Effect: Allow
            Resource:
              - Fn::GetAtt:
                  - S3Bucket
                  - Arn
              - Fn::Join:
                  - ""
                  - - Fn::GetAtt:
                        - S3Bucket
                        - Arn
                    - /*
            Principal:
              AWS: "*"
            Condition:
              StringEquals:
                s3:DataAccessPointAccount:
                  Ref: AWS::AccountId
  VPC:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: 10.0.0.0/16
  S3AccessPoint:
    Type: AWS::S3::AccessPoint
    Properties:
      Bucket:
        Ref: S3Bucket
      Name: my-access-point
      VpcConfiguration:
        VpcId:
          Ref: VPC
      PublicAccessBlockConfiguration:
        BlockPublicAcls: true
        IgnorePublicAcls: true
        BlockPublicPolicy: true
        RestrictPublicBuckets: true
Outputs:
  S3AccessPointArn:
    Value:
      Ref: S3AccessPoint
    Description: ARN of the sample Amazon S3 access point.
```

# AWS::S3::AccessPoint PublicAccessBlockConfiguration
<a name="aws-properties-s3-accesspoint-publicaccessblockconfiguration"></a>

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can enable the configuration options in any combination. Bucket-level settings work alongside account-level settings (which may inherit from organization-level policies). For more information about when Amazon S3 considers a bucket or object public, see [The Meaning of "Public"](https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) in the *Amazon S3 User Guide*. 

## Syntax
<a name="aws-properties-s3-accesspoint-publicaccessblockconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-s3-accesspoint-publicaccessblockconfiguration-syntax.json"></a>

```
{
  "[BlockPublicAcls](#cfn-s3-accesspoint-publicaccessblockconfiguration-blockpublicacls)" : Boolean,
  "[BlockPublicPolicy](#cfn-s3-accesspoint-publicaccessblockconfiguration-blockpublicpolicy)" : Boolean,
  "[IgnorePublicAcls](#cfn-s3-accesspoint-publicaccessblockconfiguration-ignorepublicacls)" : Boolean,
  "[RestrictPublicBuckets](#cfn-s3-accesspoint-publicaccessblockconfiguration-restrictpublicbuckets)" : Boolean
}
```

### YAML
<a name="aws-properties-s3-accesspoint-publicaccessblockconfiguration-syntax.yaml"></a>

```
  [BlockPublicAcls](#cfn-s3-accesspoint-publicaccessblockconfiguration-blockpublicacls): Boolean
  [BlockPublicPolicy](#cfn-s3-accesspoint-publicaccessblockconfiguration-blockpublicpolicy): Boolean
  [IgnorePublicAcls](#cfn-s3-accesspoint-publicaccessblockconfiguration-ignorepublicacls): Boolean
  [RestrictPublicBuckets](#cfn-s3-accesspoint-publicaccessblockconfiguration-restrictpublicbuckets): Boolean
```

## Properties
<a name="aws-properties-s3-accesspoint-publicaccessblockconfiguration-properties"></a>

`BlockPublicAcls`  <a name="cfn-s3-accesspoint-publicaccessblockconfiguration-blockpublicacls"></a>
Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket. Setting this element to `TRUE` causes the following behavior:  
+ PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is public.
+ PUT Object calls fail if the request includes a public ACL.
+ PUT Bucket calls fail if the request includes a public ACL.
Enabling this setting doesn't affect existing policies or ACLs.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BlockPublicPolicy`  <a name="cfn-s3-accesspoint-publicaccessblockconfiguration-blockpublicpolicy"></a>
Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this element to `TRUE` causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access.   
Enabling this setting doesn't affect existing bucket policies.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IgnorePublicAcls`  <a name="cfn-s3-accesspoint-publicaccessblockconfiguration-ignorepublicacls"></a>
Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket. Setting this element to `TRUE` causes Amazon S3 to ignore all public ACLs on this bucket and objects in this bucket.  
Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RestrictPublicBuckets`  <a name="cfn-s3-accesspoint-publicaccessblockconfiguration-restrictpublicbuckets"></a>
Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting this element to `TRUE` restricts access to this bucket to only AWS service principals and authorized users within this account if the bucket has a public policy.  
Enabling this setting doesn't affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::S3::AccessPoint Tag
<a name="aws-properties-s3-accesspoint-tag"></a>

A key-value pair that you use to label your access points. You can add tags to new access points when you create them, or you can add tags to existing access points. Tags can help you organize and control access to access points. For more information, see [Using tags for attribute-based access control (ABAC)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html#using-tags-for-abac).

## Syntax
<a name="aws-properties-s3-accesspoint-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-s3-accesspoint-tag-syntax.json"></a>

```
{
  "[Key](#cfn-s3-accesspoint-tag-key)" : String,
  "[Value](#cfn-s3-accesspoint-tag-value)" : String
}
```

### YAML
<a name="aws-properties-s3-accesspoint-tag-syntax.yaml"></a>

```
  [Key](#cfn-s3-accesspoint-tag-key): String
  [Value](#cfn-s3-accesspoint-tag-value): String
```

## Properties
<a name="aws-properties-s3-accesspoint-tag-properties"></a>

`Key`  <a name="cfn-s3-accesspoint-tag-key"></a>
The key of the tag. Tags are key-value pairs that you use to label your access points. Tags can help you organize and control access to access points. For more information, see [Tagging S3 resources for cost allocation or attribute-based access control (ABAC)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html).  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-s3-accesspoint-tag-value"></a>
The value of the tag. Tags are key-value pairs that you use to label your access points. Tags can help you organize and control access to access points. For more information, see [Tagging S3 resources for cost allocation or attribute-based access control (ABAC)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html).  
*Required*: Yes  
*Type*: String  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::S3::AccessPoint VpcConfiguration
<a name="aws-properties-s3-accesspoint-vpcconfiguration"></a>

The Virtual Private Cloud (VPC) configuration for this access point.

## Syntax
<a name="aws-properties-s3-accesspoint-vpcconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-s3-accesspoint-vpcconfiguration-syntax.json"></a>

```
{
  "[VpcId](#cfn-s3-accesspoint-vpcconfiguration-vpcid)" : String
}
```

### YAML
<a name="aws-properties-s3-accesspoint-vpcconfiguration-syntax.yaml"></a>

```
  [VpcId](#cfn-s3-accesspoint-vpcconfiguration-vpcid): String
```

## Properties
<a name="aws-properties-s3-accesspoint-vpcconfiguration-properties"></a>

`VpcId`  <a name="cfn-s3-accesspoint-vpcconfiguration-vpcid"></a>
If this field is specified, the access point will only allow connections from the specified VPC ID.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Examples
<a name="aws-properties-s3-accesspoint-vpcconfiguration--examples"></a>



### Create an S3 Access Point restricted to a VPC
<a name="aws-properties-s3-accesspoint-vpcconfiguration--examples--Create_an_S3_Access_Point_restricted_to_a_VPC"></a>

The following example creates an Amazon S3 access point restricted to a virtual private cloud (VPC). For more information, see [Configuring IAM policies for using access points](https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-policies.html) in the *Amazon S3 User Guide*.

#### JSON
<a name="aws-properties-s3-accesspoint-vpcconfiguration--examples--Create_an_S3_Access_Point_restricted_to_a_VPC--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "S3Bucket": {
            "Type": "AWS::S3::Bucket"
        },
        "S3BucketPolicy": {
            "Type": "AWS::S3::BucketPolicy",
            "Properties": {
                "Bucket": {
                    "Ref": "S3Bucket"
                },
                "PolicyDocument": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Action": "*",
                            "Effect": "Allow",
                            "Resource": [
                                {
                                    "Fn::GetAtt": [
                                        "S3Bucket",
                                        "Arn"
                                    ]
                                },
                                {
                                    "Fn::Join": [
                                        "",
                                        [
                                            {
                                                "Fn::GetAtt": [
                                                    "S3Bucket",
                                                    "Arn"
                                                ]
                                            },
                                            "/*"
                                        ]
                                    ]
                                }
                            ],
                            "Principal": {
                                "AWS": "*"
                            },
                            "Condition": {
                                "StringEquals": {
                                    "s3:DataAccessPointAccount": {
                                        "Ref": "AWS::AccountId"
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        },
        "VPC": {
            "Type": "AWS::EC2::VPC",
            "Properties": {
                "CidrBlock": "10.0.0.0/16"
            }
        },
        "S3AccessPoint": {
            "Type": "AWS::S3::AccessPoint",
            "Properties": {
                "Bucket": {
                    "Ref": "S3Bucket"
                },
                "Name": "my-access-point",
                "VpcConfiguration": {
                    "VpcId": {
                        "Ref": "VPC"
                    }
                },
                "PublicAccessBlockConfiguration": {
                    "BlockPublicAcls": true,
                    "IgnorePublicAcls": true,
                    "BlockPublicPolicy": true,
                    "RestrictPublicBuckets": true
                }
            }
        }
    },
    "Outputs": {
        "S3AccessPointArn": {
            "Value": {
                "Ref": "S3AccessPoint"
            },
            "Description": "ARN of the sample Amazon S3 access point."
        }
    }
}
```

#### YAML
<a name="aws-properties-s3-accesspoint-vpcconfiguration--examples--Create_an_S3_Access_Point_restricted_to_a_VPC--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
  S3BucketPolicy:
    Type: AWS::S3::BucketPolicy
    Properties:
      Bucket:
        Ref: S3Bucket
      PolicyDocument:
        Version: 2012-10-17
        Statement:
          - Action: "*"
            Effect: Allow
            Resource:
              - Fn::GetAtt:
                  - S3Bucket
                  - Arn
              - Fn::Join:
                  - ""
                  - - Fn::GetAtt:
                        - S3Bucket
                        - Arn
                    - /*
            Principal:
              AWS: "*"
            Condition:
              StringEquals:
                s3:DataAccessPointAccount:
                  Ref: AWS::AccountId
  VPC:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: 10.0.0.0/16
  S3AccessPoint:
    Type: AWS::S3::AccessPoint
    Properties:
      Bucket:
        Ref: S3Bucket
      Name: my-access-point
      VpcConfiguration:
        VpcId:
          Ref: VPC
      PublicAccessBlockConfiguration:
        BlockPublicAcls: true
        IgnorePublicAcls: true
        BlockPublicPolicy: true
        RestrictPublicBuckets: true
Outputs:
  S3AccessPointArn:
    Value:
      Ref: S3AccessPoint
    Description: ARN of the sample Amazon S3 access point.
```