CreateAccessPoint
Creates an access point and associates it with the specified bucket. For more information, see Managing Data Access with Amazon S3 Access Points in the Amazon Simple Storage Service User Guide.
Using this action with Amazon S3 on Outposts
This action:
-
Requires a virtual private cloud (VPC) configuration as S3 on Outposts only supports VPC style access points.
-
Does not support ACL on S3 on Outposts buckets.
-
Does not support Public Access on S3 on Outposts buckets.
-
Does not support object lock for S3 on Outposts buckets.
For more information, see Using Amazon S3 on Outposts in the Amazon Simple Storage Service User Guide .
All Amazon S3 on Outposts REST API requests for this action require an additional
parameter of x-amz-outpost-id
to be passed with the request and an S3 on Outposts endpoint hostname prefix instead
of s3-control
. For an example of the request syntax for Amazon S3 on Outposts that uses the S3
on Outposts endpoint hostname prefix and the x-amz-outpost-id
derived using the access point ARN, see the Examples section.
The following actions are related to CreateAccessPoint
:
Request Syntax
PUT /v20180820/accesspoint/name
HTTP/1.1
x-amz-account-id: AccountId
<?xml version="1.0" encoding="UTF-8"?>
<CreateAccessPointRequest xmlns="http://awss3control.amazonaws.com/doc/2018-08-20/">
<Bucket>string
</Bucket>
<VpcConfiguration>
<VpcId>string
</VpcId>
</VpcConfiguration>
<PublicAccessBlockConfiguration>
<BlockPublicAcls>boolean
</BlockPublicAcls>
<BlockPublicPolicy>boolean
</BlockPublicPolicy>
<IgnorePublicAcls>boolean
</IgnorePublicAcls>
<RestrictPublicBuckets>boolean
</RestrictPublicBuckets>
</PublicAccessBlockConfiguration>
</CreateAccessPointRequest>
URI Request Parameters
The request uses the following URI parameters.
- name
-
The name you want to assign to this access point.
Length Constraints: Minimum length of 3. Maximum length of 50.
Required: Yes
- x-amz-account-id
-
The AWS account ID for the owner of the bucket for which you want to create an access point.
Length Constraints: Maximum length of 64.
Pattern:
^\d{12}$
Required: Yes
Request Body
The request accepts the following data in XML format.
- CreateAccessPointRequest
-
Root level tag for the CreateAccessPointRequest parameters.
Required: Yes
- Bucket
-
The name of the bucket that you want to associate this access point with.
For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.
For using this parameter with S3 on Outposts with the AWS SDK and CLI, you must specify the ARN of the bucket accessed in the format
arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/bucket/<my-bucket-name>
. For example, to access the bucketreports
through outpostmy-outpost
owned by account123456789012
in Regionus-west-2
, use the URL encoding ofarn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports
. The value must be URL encoded.Type: String
Length Constraints: Minimum length of 3. Maximum length of 255.
Required: Yes
- PublicAccessBlockConfiguration
-
The
PublicAccessBlock
configuration that you want to apply to this Amazon S3 account. 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" in the Amazon Simple Storage Service Developer Guide.This is not supported for Amazon S3 on Outposts.
Type: PublicAccessBlockConfiguration data type
Required: No
- VpcConfiguration
-
If you include this field, Amazon S3 restricts access to this access point to requests from the specified virtual private cloud (VPC).
Note This is required for creating an access point for Amazon S3 on Outposts buckets.
Type: VpcConfiguration data type
Required: No
Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<CreateAccessPointResult>
<AccessPointArn>string</AccessPointArn>
</CreateAccessPointResult>
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in XML format by the service.
- CreateAccessPointResult
-
Root level tag for the CreateAccessPointResult parameters.
Required: Yes
- AccessPointArn
-
The ARN of the access point.
Note This is only supported by Amazon S3 on Outposts.
Type: String
Length Constraints: Minimum length of 4. Maximum length of 128.
Examples
Sample request for creating an access point for an Amazon S3 on Outposts bucket
This request creates an access point for S3 on Outposts bucket.
PUT /v20180820/accesspoint/example-access-point HTTP/1.1 Host:s3-outposts.<Region>.amazonaws.com x-amz-account-id: example-account-id x-amz-outpost-id: op-01ac5d28a6a232904 <?xml version="1.0" encoding="UTF-8"?> <CreateAccessPointRequest xmlns="http://awss3control.amazonaws.com/doc/2018-08-20/"> <Bucket>example-outpost-bucket </Bucket> </CreateAccessPointRequest>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: