Answers: <p>AWS has two different STS services, one is global (legacy) and the other is regional. The global service gives you session tokens that are not necessarily valid in all regions, while the regional ones are. There is a setting in Azure ADO to specify that the tokens should be valid in all regions or not. Changing that has fixed the problem.</p>
  
Answers: CC BY-SA 4.0
Answers: 2024-10-31T07:54:15.337Z
Answers: 2024-10-31T07:54:15.337Z
Answers: Sean
Body: <p>We are building a simple website and pushing it to an S3 bucket on AWS with a release pipeline. We configured the service connection in ADO with an access key and secret from AWS and the deploy was working to one region. However, we have since changed region on AWS and rebuilt the environment and now the release pipeline fails every time. The error given is</p>
  <pre><code>##[error]Error: Bucket xxx does not exist or you do not have access. 
     Auto-create option not set, cannot continue.
  </code></pre>
  <p>The bucket does exist, we can push files to it with the AWS CLI using the same credentials, and if we create a bucket in the original region with the same bucket policy then we can release to it from ADO successfully. It is only the new region that fails with the above.</p>
  
Tags: <azure-devops><amazon-s3>
Title: Azure DevOps release to AWS fails with bucket does not exist
UserDisplayName: Sean
ThreadText: # Azure DevOps release to AWS fails with bucket does not exist
  
  (Asked by: username_0 on 2024-10-29)
  
  We are building a simple website and pushing it to an S3 bucket on AWS with a release pipeline. We configured the service connection in ADO with an access key and secret from AWS and the deploy was working to one region. However, we have since changed region on AWS and rebuilt the environment and now the release pipeline fails every time. The error given is
  
  ```
  ##[error]Error: Bucket xxx does not exist or you do not have access. 
     Auto-create option not set, cannot continue.
  
  ```
  
  The bucket does exist, we can push files to it with the AWS CLI using the same credentials, and if we create a bucket in the original region with the same bucket policy then we can release to it from ADO successfully. It is only the new region that fails with the above.
  
  **Tags:** azure-devops, amazon-s3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-10-31. Score: 0
  
  AWS has two different STS services, one is global (legacy) and the other is regional. The global service gives you session tokens that are not necessarily valid in all regions, while the regional ones are. There is a setting in Azure ADO to specify that the tokens should be valid in all regions or not. Changing that has fixed the problem.
  
  
  ---
  
  