docs.aws.amazon.com Open in urlscan Pro
18.173.132.126  Public Scan

URL: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html
Submission: On October 29 via api from KR — Scanned from US

Form analysis 0 forms found in the DOM

Text Content

SELECT YOUR COOKIE PREFERENCES

We use essential cookies and similar tools that are necessary to provide our
site and services. We use performance cookies to collect anonymous statistics so
we can understand how customers use our site and make improvements. Essential
cookies cannot be deactivated, but you can click “Customize cookies” to decline
performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide
useful site features, remember your preferences, and display relevant content,
including relevant advertising. To continue without accepting these cookies,
click “Continue without accepting.” To make more detailed choices or learn more,
click “Customize cookies.”

Accept all cookiesContinue without acceptingCustomize cookies


CUSTOMIZE COOKIE PREFERENCES

We use cookies and similar tools (collectively, "cookies") for the following
purposes.


ESSENTIAL

Essential cookies are necessary to provide our site and services and cannot be
deactivated. They are usually set in response to your actions on the site, such
as setting your privacy preferences, signing in, or filling in forms.




PERFORMANCE

Performance cookies provide anonymous statistics about how customers navigate
our site so we can improve site experience and performance. Approved third
parties may perform analytics on our behalf, but they cannot use the data for
their own purposes.

Allow performance category
Allowed


FUNCTIONAL

Functional cookies help us provide useful site features, remember your
preferences, and display relevant content. Approved third parties may set these
cookies to provide certain site features. If you do not allow these cookies,
then some or all of these services may not function properly.

Allow functional category
Allowed


ADVERTISING

Advertising cookies may be set through our site by us or our advertising
partners and help us deliver relevant marketing content. If you do not allow
these cookies, you will experience less relevant advertising.

Allow advertising category
Allowed

Blocking some types of cookies may impact your experience of our sites. You may
review and change your choices at any time by clicking Cookie preferences in the
footer of this site. We and selected third-parties use cookies or similar
technologies as specified in the AWS Cookie Notice.

CancelSave preferences




UNABLE TO SAVE COOKIE PREFERENCES

We will only store essential cookies at this time, because we were unable to
save your cookie preferences.

If you want to change your cookie preferences, try again later using the link in
the AWS console footer, or contact support if the problem persists.

Dismiss


Contact Us
English



Create an AWS Account
 1. AWS
 2. ...
    
    
 3. Documentation
 4. Amazon Simple Storage Service (S3)
 5. API Reference

Feedback
Preferences


AMAZON SIMPLE STORAGE SERVICE


API REFERENCE

 * Welcome
 * S3 API Reference
    * Actions
       * Amazon S3
          * AbortMultipartUpload
          * CompleteMultipartUpload
          * CopyObject
          * CreateBucket
          * CreateMultipartUpload
          * CreateSession
          * DeleteBucket
          * DeleteBucketAnalyticsConfiguration
          * DeleteBucketCors
          * DeleteBucketEncryption
          * DeleteBucketIntelligentTieringConfiguration
          * DeleteBucketInventoryConfiguration
          * DeleteBucketLifecycle
          * DeleteBucketMetricsConfiguration
          * DeleteBucketOwnershipControls
          * DeleteBucketPolicy
          * DeleteBucketReplication
          * DeleteBucketTagging
          * DeleteBucketWebsite
          * DeleteObject
          * DeleteObjects
          * DeleteObjectTagging
          * DeletePublicAccessBlock
          * GetBucketAccelerateConfiguration
          * GetBucketAcl
          * GetBucketAnalyticsConfiguration
          * GetBucketCors
          * GetBucketEncryption
          * GetBucketIntelligentTieringConfiguration
          * GetBucketInventoryConfiguration
          * GetBucketLifecycle
          * GetBucketLifecycleConfiguration
          * GetBucketLocation
          * GetBucketLogging
          * GetBucketMetricsConfiguration
          * GetBucketNotification
          * GetBucketNotificationConfiguration
          * GetBucketOwnershipControls
          * GetBucketPolicy
          * GetBucketPolicyStatus
          * GetBucketReplication
          * GetBucketRequestPayment
          * GetBucketTagging
          * GetBucketVersioning
          * GetBucketWebsite
          * GetObject
          * GetObjectAcl
          * GetObjectAttributes
          * GetObjectLegalHold
          * GetObjectLockConfiguration
          * GetObjectRetention
          * GetObjectTagging
          * GetObjectTorrent
          * GetPublicAccessBlock
          * HeadBucket
          * HeadObject
          * ListBucketAnalyticsConfigurations
          * ListBucketIntelligentTieringConfigurations
          * ListBucketInventoryConfigurations
          * ListBucketMetricsConfigurations
          * ListBuckets
          * ListDirectoryBuckets
          * ListMultipartUploads
          * ListObjects
          * ListObjectsV2
          * ListObjectVersions
          * ListParts
          * PutBucketAccelerateConfiguration
          * PutBucketAcl
          * PutBucketAnalyticsConfiguration
          * PutBucketCors
          * PutBucketEncryption
          * PutBucketIntelligentTieringConfiguration
          * PutBucketInventoryConfiguration
          * PutBucketLifecycle
          * PutBucketLifecycleConfiguration
          * PutBucketLogging
          * PutBucketMetricsConfiguration
          * PutBucketNotification
          * PutBucketNotificationConfiguration
          * PutBucketOwnershipControls
          * PutBucketPolicy
          * PutBucketReplication
          * PutBucketRequestPayment
          * PutBucketTagging
          * PutBucketVersioning
          * PutBucketWebsite
          * PutObject
          * PutObjectAcl
          * PutObjectLegalHold
          * PutObjectLockConfiguration
          * PutObjectRetention
          * PutObjectTagging
          * PutPublicAccessBlock
          * RestoreObject
          * SelectObjectContent
          * UploadPart
          * UploadPartCopy
          * WriteGetObjectResponse
      
       * Amazon S3 Control
          * AssociateAccessGrantsIdentityCenter
          * CreateAccessGrant
          * CreateAccessGrantsInstance
          * CreateAccessGrantsLocation
          * CreateAccessPoint
          * CreateAccessPointForObjectLambda
          * CreateBucket
          * CreateJob
          * CreateMultiRegionAccessPoint
          * CreateStorageLensGroup
          * DeleteAccessGrant
          * DeleteAccessGrantsInstance
          * DeleteAccessGrantsInstanceResourcePolicy
          * DeleteAccessGrantsLocation
          * DeleteAccessPoint
          * DeleteAccessPointForObjectLambda
          * DeleteAccessPointPolicy
          * DeleteAccessPointPolicyForObjectLambda
          * DeleteBucket
          * DeleteBucketLifecycleConfiguration
          * DeleteBucketPolicy
          * DeleteBucketReplication
          * DeleteBucketTagging
          * DeleteJobTagging
          * DeleteMultiRegionAccessPoint
          * DeletePublicAccessBlock
          * DeleteStorageLensConfiguration
          * DeleteStorageLensConfigurationTagging
          * DeleteStorageLensGroup
          * DescribeJob
          * DescribeMultiRegionAccessPointOperation
          * DissociateAccessGrantsIdentityCenter
          * GetAccessGrant
          * GetAccessGrantsInstance
          * GetAccessGrantsInstanceForPrefix
          * GetAccessGrantsInstanceResourcePolicy
          * GetAccessGrantsLocation
          * GetAccessPoint
          * GetAccessPointConfigurationForObjectLambda
          * GetAccessPointForObjectLambda
          * GetAccessPointPolicy
          * GetAccessPointPolicyForObjectLambda
          * GetAccessPointPolicyStatus
          * GetAccessPointPolicyStatusForObjectLambda
          * GetBucket
          * GetBucketLifecycleConfiguration
          * GetBucketPolicy
          * GetBucketReplication
          * GetBucketTagging
          * GetBucketVersioning
          * GetDataAccess
          * GetJobTagging
          * GetMultiRegionAccessPoint
          * GetMultiRegionAccessPointPolicy
          * GetMultiRegionAccessPointPolicyStatus
          * GetMultiRegionAccessPointRoutes
          * GetPublicAccessBlock
          * GetStorageLensConfiguration
          * GetStorageLensConfigurationTagging
          * GetStorageLensGroup
          * ListAccessGrants
          * ListAccessGrantsInstances
          * ListAccessGrantsLocations
          * ListAccessPoints
          * ListAccessPointsForObjectLambda
          * ListCallerAccessGrants
          * ListJobs
          * ListMultiRegionAccessPoints
          * ListRegionalBuckets
          * ListStorageLensConfigurations
          * ListStorageLensGroups
          * ListTagsForResource
          * PutAccessGrantsInstanceResourcePolicy
          * PutAccessPointConfigurationForObjectLambda
          * PutAccessPointPolicy
          * PutAccessPointPolicyForObjectLambda
          * PutBucketLifecycleConfiguration
          * PutBucketPolicy
          * PutBucketReplication
          * PutBucketTagging
          * PutBucketVersioning
          * PutJobTagging
          * PutMultiRegionAccessPointPolicy
          * PutPublicAccessBlock
          * PutStorageLensConfiguration
          * PutStorageLensConfigurationTagging
          * SubmitMultiRegionAccessPointRoutes
          * TagResource
          * UntagResource
          * UpdateAccessGrantsLocation
          * UpdateJobPriority
          * UpdateJobStatus
          * UpdateStorageLensGroup
      
       * Amazon S3 on Outposts
          * CreateEndpoint
          * DeleteEndpoint
          * ListEndpoints
          * ListOutpostsWithS3
          * ListSharedEndpoints
   
    * Data Types
       * Amazon S3
          * AbortIncompleteMultipartUpload
          * AccelerateConfiguration
          * AccessControlPolicy
          * AccessControlTranslation
          * AnalyticsAndOperator
          * AnalyticsConfiguration
          * AnalyticsExportDestination
          * AnalyticsFilter
          * AnalyticsS3BucketDestination
          * Bucket
          * BucketInfo
          * BucketLifecycleConfiguration
          * BucketLoggingStatus
          * Checksum
          * CloudFunctionConfiguration
          * CommonPrefix
          * CompletedMultipartUpload
          * CompletedPart
          * Condition
          * ContinuationEvent
          * CopyObjectResult
          * CopyPartResult
          * CORSConfiguration
          * CORSRule
          * CreateBucketConfiguration
          * CSVInput
          * CSVOutput
          * DefaultRetention
          * Delete
          * DeletedObject
          * DeleteMarkerEntry
          * DeleteMarkerReplication
          * Destination
          * Encryption
          * EncryptionConfiguration
          * EndEvent
          * Error
          * ErrorDocument
          * EventBridgeConfiguration
          * ExistingObjectReplication
          * FilterRule
          * GetObjectAttributesParts
          * GlacierJobParameters
          * Grant
          * Grantee
          * IndexDocument
          * Initiator
          * InputSerialization
          * IntelligentTieringAndOperator
          * IntelligentTieringConfiguration
          * IntelligentTieringFilter
          * InventoryConfiguration
          * InventoryDestination
          * InventoryEncryption
          * InventoryFilter
          * InventoryS3BucketDestination
          * InventorySchedule
          * JSONInput
          * JSONOutput
          * LambdaFunctionConfiguration
          * LifecycleConfiguration
          * LifecycleExpiration
          * LifecycleRule
          * LifecycleRuleAndOperator
          * LifecycleRuleFilter
          * LocationInfo
          * LoggingEnabled
          * MetadataEntry
          * Metrics
          * MetricsAndOperator
          * MetricsConfiguration
          * MetricsFilter
          * MultipartUpload
          * NoncurrentVersionExpiration
          * NoncurrentVersionTransition
          * NotificationConfiguration
          * NotificationConfigurationDeprecated
          * NotificationConfigurationFilter
          * Object
          * ObjectIdentifier
          * ObjectLockConfiguration
          * ObjectLockLegalHold
          * ObjectLockRetention
          * ObjectLockRule
          * ObjectPart
          * ObjectVersion
          * OutputLocation
          * OutputSerialization
          * Owner
          * OwnershipControls
          * OwnershipControlsRule
          * ParquetInput
          * Part
          * PartitionedPrefix
          * PolicyStatus
          * Progress
          * ProgressEvent
          * PublicAccessBlockConfiguration
          * QueueConfiguration
          * QueueConfigurationDeprecated
          * RecordsEvent
          * Redirect
          * RedirectAllRequestsTo
          * ReplicaModifications
          * ReplicationConfiguration
          * ReplicationRule
          * ReplicationRuleAndOperator
          * ReplicationRuleFilter
          * ReplicationTime
          * ReplicationTimeValue
          * RequestPaymentConfiguration
          * RequestProgress
          * RestoreRequest
          * RestoreStatus
          * RoutingRule
          * Rule
          * S3KeyFilter
          * S3Location
          * ScanRange
          * SelectObjectContentEventStream
          * SelectParameters
          * ServerSideEncryptionByDefault
          * ServerSideEncryptionConfiguration
          * ServerSideEncryptionRule
          * SessionCredentials
          * SimplePrefix
          * SourceSelectionCriteria
          * SSEKMS
          * SseKmsEncryptedObjects
          * SSES3
          * Stats
          * StatsEvent
          * StorageClassAnalysis
          * StorageClassAnalysisDataExport
          * Tag
          * Tagging
          * TargetGrant
          * TargetObjectKeyFormat
          * Tiering
          * TopicConfiguration
          * TopicConfigurationDeprecated
          * Transition
          * VersioningConfiguration
          * WebsiteConfiguration
      
       * Amazon S3 Control
          * AbortIncompleteMultipartUpload
          * AccessControlTranslation
          * AccessGrantsLocationConfiguration
          * AccessPoint
          * AccountLevel
          * ActivityMetrics
          * AdvancedCostOptimizationMetrics
          * AdvancedDataProtectionMetrics
          * AsyncErrorDetails
          * AsyncOperation
          * AsyncRequestParameters
          * AsyncResponseDetails
          * AwsLambdaTransformation
          * BucketLevel
          * CloudWatchMetrics
          * CreateBucketConfiguration
          * CreateMultiRegionAccessPointInput
          * Credentials
          * DeleteMarkerReplication
          * DeleteMultiRegionAccessPointInput
          * Destination
          * DetailedStatusCodesMetrics
          * EncryptionConfiguration
          * EstablishedMultiRegionAccessPointPolicy
          * Exclude
          * ExistingObjectReplication
          * GeneratedManifestEncryption
          * Grantee
          * Include
          * JobDescriptor
          * JobFailure
          * JobListDescriptor
          * JobManifest
          * JobManifestGenerator
          * JobManifestGeneratorFilter
          * JobManifestLocation
          * JobManifestSpec
          * JobOperation
          * JobProgressSummary
          * JobReport
          * JobTimers
          * KeyNameConstraint
          * LambdaInvokeOperation
          * LifecycleConfiguration
          * LifecycleExpiration
          * LifecycleRule
          * LifecycleRuleAndOperator
          * LifecycleRuleFilter
          * ListAccessGrantEntry
          * ListAccessGrantsInstanceEntry
          * ListAccessGrantsLocationsEntry
          * ListCallerAccessGrantsEntry
          * ListStorageLensConfigurationEntry
          * ListStorageLensGroupEntry
          * MatchObjectAge
          * MatchObjectSize
          * Metrics
          * MultiRegionAccessPointPolicyDocument
          * MultiRegionAccessPointRegionalResponse
          * MultiRegionAccessPointReport
          * MultiRegionAccessPointRoute
          * MultiRegionAccessPointsAsyncResponse
          * NoncurrentVersionExpiration
          * NoncurrentVersionTransition
          * ObjectLambdaAccessPoint
          * ObjectLambdaAccessPointAlias
          * ObjectLambdaConfiguration
          * ObjectLambdaContentTransformation
          * ObjectLambdaTransformationConfiguration
          * PolicyStatus
          * PrefixLevel
          * PrefixLevelStorageMetrics
          * ProposedMultiRegionAccessPointPolicy
          * PublicAccessBlockConfiguration
          * PutMultiRegionAccessPointPolicyInput
          * Region
          * RegionalBucket
          * RegionReport
          * ReplicaModifications
          * ReplicationConfiguration
          * ReplicationRule
          * ReplicationRuleAndOperator
          * ReplicationRuleFilter
          * ReplicationTime
          * ReplicationTimeValue
          * S3AccessControlList
          * S3AccessControlPolicy
          * S3BucketDestination
          * S3CopyObjectOperation
          * S3DeleteObjectTaggingOperation
          * S3GeneratedManifestDescriptor
          * S3Grant
          * S3Grantee
          * S3InitiateRestoreObjectOperation
          * S3JobManifestGenerator
          * S3ManifestOutputLocation
          * S3ObjectLockLegalHold
          * S3ObjectMetadata
          * S3ObjectOwner
          * S3ReplicateObjectOperation
          * S3Retention
          * S3SetObjectAclOperation
          * S3SetObjectLegalHoldOperation
          * S3SetObjectRetentionOperation
          * S3SetObjectTaggingOperation
          * S3Tag
          * SelectionCriteria
          * SourceSelectionCriteria
          * SSEKMS
          * SseKmsEncryptedObjects
          * SSEKMSEncryption
          * SSES3
          * SSES3Encryption
          * StorageLensAwsOrg
          * StorageLensConfiguration
          * StorageLensDataExport
          * StorageLensDataExportEncryption
          * StorageLensGroup
          * StorageLensGroupAndOperator
          * StorageLensGroupFilter
          * StorageLensGroupLevel
          * StorageLensGroupLevelSelectionCriteria
          * StorageLensGroupOrOperator
          * StorageLensTag
          * Tag
          * Tagging
          * Transition
          * VersioningConfiguration
          * VpcConfiguration
      
       * Amazon S3 on Outposts
          * Endpoint
          * FailedReason
          * NetworkInterface
          * Outpost

 * Developing with Amazon S3
    * Making requests
       * Making requests over IPv6
          * Using dual-stack endpoints
      
       * Making requests using the AWS SDKs
          * Using AWS account or IAM user credentials
          * Using IAM user temporary credentials
          * Using federated user temporary credentials
      
       * Making requests using the REST API
          * Request redirection and the REST API
          * Request routing
   
    * Using the AWS CLI
    * Developing with AWS SDKs
       * Specifying the Signature Version in Request Authentication
   
    * Get Amazon S3 request IDs for AWS Support

 * Code examples
    * Amazon S3
       * Basics
          * Hello Amazon S3
          * Learn the basics
          * Learn the basics of S3 Express One Zone
          * Actions
             * AbortMultipartUpload
             * AbortMultipartUploads
             * CompleteMultipartUpload
             * CopyObject
             * CreateBucket
             * CreateMultiRegionAccessPoint
             * CreateMultipartUpload
             * DeleteBucket
             * DeleteBucketAnalyticsConfiguration
             * DeleteBucketCors
             * DeleteBucketEncryption
             * DeleteBucketInventoryConfiguration
             * DeleteBucketLifecycle
             * DeleteBucketMetricsConfiguration
             * DeleteBucketPolicy
             * DeleteBucketReplication
             * DeleteBucketTagging
             * DeleteBucketWebsite
             * DeleteObject
             * DeleteObjectTagging
             * DeleteObjects
             * DeletePublicAccessBlock
             * GetBucketAccelerateConfiguration
             * GetBucketAcl
             * GetBucketAnalyticsConfiguration
             * GetBucketCors
             * GetBucketEncryption
             * GetBucketInventoryConfiguration
             * GetBucketLifecycleConfiguration
             * GetBucketLocation
             * GetBucketLogging
             * GetBucketMetricsConfiguration
             * GetBucketNotification
             * GetBucketPolicy
             * GetBucketPolicyStatus
             * GetBucketReplication
             * GetBucketRequestPayment
             * GetBucketTagging
             * GetBucketVersioning
             * GetBucketWebsite
             * GetObject
             * GetObjectAcl
             * GetObjectAttributes
             * GetObjectLegalHold
             * GetObjectLockConfiguration
             * GetObjectRetention
             * GetObjectTagging
             * GetPublicAccessBlock
             * HeadBucket
             * HeadObject
             * ListBucketAnalyticsConfigurations
             * ListBucketInventoryConfigurations
             * ListBuckets
             * ListMultipartUploads
             * ListObjectVersions
             * ListObjects
             * ListObjectsV2
             * PutBucketAccelerateConfiguration
             * PutBucketAcl
             * PutBucketCors
             * PutBucketEncryption
             * PutBucketLifecycleConfiguration
             * PutBucketLogging
             * PutBucketNotification
             * PutBucketNotificationConfiguration
             * PutBucketPolicy
             * PutBucketReplication
             * PutBucketRequestPayment
             * PutBucketTagging
             * PutBucketVersioning
             * PutBucketWebsite
             * PutObject
             * PutObjectAcl
             * PutObjectLegalHold
             * PutObjectLockConfiguration
             * PutObjectRetention
             * RestoreObject
             * SelectObjectContent
             * UploadPart
      
       * Scenarios
          * Convert text to speech and back to text
          * Create a presigned URL
          * Create a serverless application to manage photos
          * Create a web page that lists Amazon S3 objects
          * Create an Amazon Textract explorer application
          * Delete all objects in a bucket
          * Delete incomplete multipart uploads
          * Detect PPE in images
          * Detect entities in text extracted from an image
          * Detect faces in an image
          * Detect objects in images
          * Detect people and objects in a video
          * Download objects to a local directory
          * Get an object from a Multi-Region Access Point
          * Get an object from a bucket if it has been modified
          * Get started with encryption
          * Get started with tags
          * Lock Amazon S3 objects
          * Manage access control lists (ACLs)
          * Manage versioned objects in batches with a Lambda function
          * Parse URIs
          * Perform a multipart copy
          * Process S3 event notifications
          * Save EXIF and other image information
          * Send event notifications to EventBridge
          * Track uploads and downloads
          * Transform data with S3 Object Lambda
          * Unit and integration test with an SDK
          * Upload directory to a bucket
          * Upload or download large files
          * Upload stream of unknown size
          * Use checksums
          * Work with Amazon S3 object integrity
          * Work with versioned objects
      
       * Serverless examples
          * Invoke a Lambda function from an Amazon S3 trigger
   
    * Amazon S3 Control
       * Basics
          * Hello 'Amazon S3 Control'
          * Learn the basics
          * Actions
             * CreateJob
             * DeleteJobTagging
             * DescribeJob
             * GetJobTagging
             * PutJobTagging
             * UpdateJobPriority
             * UpdateJobStatus

 * Authenticating Requests (AWS Signature Version 4)
    * Using an Authorization Header
       * Signature Calculation: Transfer Payload in a Single Chunk
       * Signature Calculation: Transfer Payload in Multiple Chunks
       * Signature Calculation: Including Trailing Headers
   
    * Using Query Parameters
    * Examples: Signature Calculations
    * Authenticating HTTP POST Requests
    * Amazon S3 Signature Version 4 Authentication Specific Policy Keys

 * Browser-Based Uploads Using POST
    * POST Object
       * Versioning
   
    * POST Object restore
    * Creating HTML Forms
    * POST Policy
    * POST Upload Example
    * Browser-Based Uploads Using AWS Amplify

 * Common Request Headers
 * Common Response Headers
 * Error responses
    * Amazon S3 error best practices

 * AWS Glossary
 * Resources
 * Document History
 * Appendix
    * Appendix: SelectObjectContent Response
    * Appendix: OPTIONS object
    * Appendix: SOAP API
       * Operations on the Service (SOAP API)
          * ListAllMyBuckets (SOAP API)
      
       * Operations on Buckets (SOAP API)
          * CreateBucket (SOAP API)
          * DeleteBucket (SOAP API)
          * ListBucket (SOAP API)
          * GetBucketAccessControlPolicy (SOAP API)
          * SetBucketAccessControlPolicy (SOAP API)
          * GetBucketLoggingStatus (SOAP API)
          * SetBucketLoggingStatus (SOAP API)
      
       * Operations on Objects (SOAP API)
          * PutObjectInline (SOAP API)
          * PutObject (SOAP API)
          * CopyObject (SOAP API)
          * GetObject (SOAP API)
          * GetObjectExtended (SOAP API)
          * DeleteObject (SOAP API)
          * GetObjectAccessControlPolicy (SOAP API)
          * SetObjectAccessControlPolicy (SOAP API)
      
       * Authenticating SOAP requests
       * Setting access policy with SOAP
       * SOAP Error Responses
   
    * Appendix: Authenticating requests (AWS signature version 2)
       * Authenticating requests using the REST API (AWS signature version 2)
       * Signing and authenticating REST requests (AWS signature version 2)
       * Browser-based uploads using POST (AWS signature version 2)
          * HTML forms
          * Upload examples
          * POST with adobe flash (AWS signature version 2)
   
    * Appendix: Lifecycle Configuration APIs (Deprecated)
       * PUT Bucket lifecycle (Deprecated)
       * GET Bucket lifecycle (Deprecated)

GetBucketLocation - Amazon Simple Storage Service
AWSDocumentationAmazon Simple Storage Service (S3)API Reference
Request SyntaxURI Request ParametersRequest BodyResponse SyntaxResponse
ElementsExamplesSee Also


GETBUCKETLOCATION


PDF

NOTE

This operation is not supported by directory buckets.

Returns the Region the bucket resides in. You set the bucket's Region using the
LocationConstraint request parameter in a CreateBucket request. For more
information, see CreateBucket.

When you use this API operation with an access point, provide the alias of the
access point in place of the bucket name.

When you use this API operation with an Object Lambda access point, provide the
alias of the Object Lambda access point in place of the bucket name. If the
Object Lambda access point alias in a request is not valid, the error code
InvalidAccessPointAliasError is returned. For more information about
InvalidAccessPointAliasError, see List of Error Codes.

NOTE

We recommend that you use HeadBucket to return the Region that a bucket resides
in. For backward compatibility, Amazon S3 continues to support
GetBucketLocation.

The following operations are related to GetBucketLocation:

 * GetObject

 * CreateBucket


REQUEST SYNTAX


GET /?location HTTP/1.1
Host: Bucket.s3.amazonaws.com
x-amz-expected-bucket-owner: ExpectedBucketOwner



URI REQUEST PARAMETERS


The request uses the following URI parameters.

Bucket

The name of the bucket for which to get the location.

When you use this API operation with an access point, provide the alias of the
access point in place of the bucket name.

When you use this API operation with an Object Lambda access point, provide the
alias of the Object Lambda access point in place of the bucket name. If the
Object Lambda access point alias in a request is not valid, the error code
InvalidAccessPointAliasError is returned. For more information about
InvalidAccessPointAliasError, see List of Error Codes.

Required: Yes

x-amz-expected-bucket-owner

The account ID of the expected bucket owner. If the account ID that you provide
does not match the actual owner of the bucket, the request fails with the HTTP
status code 403 Forbidden (access denied).


REQUEST BODY


The request does not have a request body.


RESPONSE SYNTAX


HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<LocationConstraint>
   <LocationConstraint>string</LocationConstraint>
</LocationConstraint>


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.

LocationConstraint

Root level tag for the LocationConstraint parameters.

Required: Yes

LocationConstraint

Specifies the Region where the bucket resides. For a list of all the Amazon S3
supported location constraints by Region, see Regions and Endpoints. Buckets in
Region us-east-1 have a LocationConstraint of null.

Type: String

Valid Values: af-south-1 | ap-east-1 | ap-northeast-1 | ap-northeast-2 |
ap-northeast-3 | ap-south-1 | ap-south-2 | ap-southeast-1 | ap-southeast-2 |
ap-southeast-3 | ca-central-1 | cn-north-1 | cn-northwest-1 | EU | eu-central-1
| eu-north-1 | eu-south-1 | eu-south-2 | eu-west-1 | eu-west-2 | eu-west-3 |
me-south-1 | sa-east-1 | us-east-2 | us-gov-east-1 | us-gov-west-1 | us-west-1 |
us-west-2


EXAMPLES



SAMPLE REQUEST

The following request returns the Region of the specified bucket.


         GET /?location HTTP/1.1
         Host: myBucket.s3.amazonaws.com
         Date: Tue, 09 Oct 2007 20:26:04 +0000
         Authorization: signatureValue
         


SAMPLE RESPONSE

This example illustrates one usage of GetBucketLocation.


         <?xml version="1.0" encoding="UTF-8"?>
         <LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">us-west-2</LocationConstraint>
         


SEE ALSO


For more information about using this API in one of the language-specific AWS
SDKs, see the following:

 * AWS Command Line Interface

 * AWS SDK for .NET

 * AWS SDK for C++

 * AWS SDK for Go v2

 * AWS SDK for Java V2

 * AWS SDK for JavaScript V3

 * AWS SDK for PHP V3

 * AWS SDK for Python

 * AWS SDK for Ruby V3

Javascript is disabled or is unavailable in your browser.

To use the Amazon Web Services Documentation, Javascript must be enabled. Please
refer to your browser's Help pages for instructions.

Document Conventions
GetBucketLifecycleConfiguration
GetBucketLogging
Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of
it.



Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.





DID THIS PAGE HELP YOU?

Yes
No
Provide feedback

NEXT TOPIC:

GetBucketLogging

PREVIOUS TOPIC:

GetBucketLifecycleConfiguration

NEED HELP?

 * Try AWS re:Post 
 * Connect with an AWS IQ expert 

PrivacySite termsCookie preferences
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.


ON THIS PAGE

 * Request Syntax
 * URI Request Parameters
 * Request Body
 * Response Syntax
 * Response Elements
 * Examples
 * See Also