Root cause:

ARTIFACTORY: The S3 doesn’t create the nonexistent dir when copying uploaded artifacts to the specified dir in the S3 is another cause for the "AmazonS3Exception (Status Code: 404; Error Code: NoSuchKey)" error

AuthorFullName__c
Sun Jinlong
articleNumber
000005989
ft:sourceType
Salesforce
FirstPublishedDate
2024-01-18T10:02:32Z
lastModifiedDate
2024-01-18
VersionNumber
1
Upload artifacts from Artifactory to S3 will follow the steps:
  1. Uploading the file to a tmp dir in the S3 bucket like <bucket_path>/filestore/_p and file will name as _pre_<filename>
  2. After the file is successfully uploaded to the S3 bucket _p tmp directory, the file will copy to the specified bucket directory.
  3. The specified bucket directory is named as the first two digits of the sha1 value of the file. If the specified bucket directory exists, it will copy the file directly to the specified bucket directory. If the specified bucket directory does not exist, the specified bucket directory needs to be created, and then the file is copied to the specified bucket directory.
  4. The file will be deleted from the _p directory in the bucket regardless of whether the file is copied successfully
The reason for the issue is in Step3, when copying the file from the bucket _p tmp dir to the specified bucket directory, the specified bucket directory doesn't exist and JuiceFS doesn't create the specified bucket directory.