{"record":{"id":"6b23fb020490fc1f","repo":"apache/dolphinscheduler","slug":"bucketname-bucketname-is-not-exists-you-need-6b23fb","errorCode":null,"errorMessage":"bucketName: ${bucketName} is not exists, you need to create them by yourself","messagePattern":"bucketName: (.+?) is not exists, you need to create them by yourself","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-storage-plugin/dolphinscheduler-storage-s3/src/main/java/org/apache/dolphinscheduler/plugin/storage/s3/S3StorageOperator.java","lineNumber":216,"sourceCode":"        S3Object s3Object = s3Client.getObject(bucketName, filePath);\n        try (\n                InputStreamReader inputStreamReader = new InputStreamReader(s3Object.getObjectContent());\n                BufferedReader bufferedReader = new BufferedReader(inputStreamReader)) {\n            return bufferedReader.lines()\n                    .skip(skipLineNums)\n                    .limit(limit)\n                    .collect(Collectors.toList());\n        }\n    }\n\n    void exceptionWhenBucketNameNotExists(String bucketName) {\n        if (StringUtils.isBlank(bucketName)) {\n            throw new IllegalArgumentException(\"resource.aws.s3.bucket.name is blank\");\n        }\n\n        boolean existsBucket = s3Client.doesBucketExistV2(bucketName);\n        if (!existsBucket) {\n            throw new IllegalArgumentException(\n                    \"bucketName: \" + bucketName + \" is not exists, you need to create them by yourself\");\n        }\n\n        log.info(\"bucketName: {} has been found, the current regionName is {}\", bucketName,\n                s3Client.getRegionName());\n    }\n\n    @Override\n    public List<StorageEntity> listStorageEntity(String resourceAbsolutePath) {\n        final String s3ResourceAbsolutePath = transformAbsolutePathToS3Key(resourceAbsolutePath);\n        ListObjectsV2Request listObjectsV2Request = new ListObjectsV2Request()\n                .withBucketName(bucketName)\n                .withDelimiter(\"/\")\n                .withPrefix(s3ResourceAbsolutePath);\n\n        List<StorageEntity> storageEntities = new ArrayList<>();\n        ListObjectsV2Result listObjectsV2Result;\n        do {","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-storage-plugin/dolphinscheduler-storage-s3/src/main/java/org/apache/dolphinscheduler/plugin/storage/s3/S3StorageOperator.java#L198-L234","documentation":"exceptionWhenBucketNameNotExists validates that the configured bucket actually exists via s3Client.doesBucketExistV2 and throws IllegalArgumentException when the bucket name is set but no such bucket is reachable in the account/region. DolphinScheduler does not auto-create buckets; the user must create them.","triggerScenarios":"S3StorageOperator construction/startup with a bucket name that does not exist in the target AWS account or region, or that is invisible due to wrong credentials/region/permissions.","commonSituations":"Typo in resource.aws.s3.bucket.name; bucket created in a different region than the client's configured region; IAM credentials lacking s3:ListBucket so existence check fails; bucket deleted after configuration.","solutions":["Create the bucket manually (aws s3 mb s3://<bucket> or via console)","Fix typos and confirm the bucket name matches the region of the S3 client","Verify credentials/IAM policy grants s3:ListBucket so doesBucketExistV2 can see the bucket","Check region configuration (resource.aws.s3.region / endpoint) matches the bucket's region"],"exampleFix":"// before (bucket never created)\nresource.aws.s3.bucket.name=nonexistent-bucket\n// after\n$ aws s3api create-bucket --bucket dolphinscheduler-resource --region us-east-1","handlingStrategy":"validation","validationCode":"import com.amazonaws.services.s3.AmazonS3;\nif (!s3.doesBucketExistV2(bucketName)) {\n    throw new IllegalArgumentException(\"Bucket \" + bucketName + \" does not exist; create it first\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    storageOperator.init();\n} catch (IllegalArgumentException e) {\n    log.error(\"Bucket validation failed: {}\", e.getMessage()); // create bucket or fix name/region/creds\n}","preventionTips":["Create the bucket before switching resource storage to S3","Match client region config to the bucket's region","Ensure IAM policy includes s3:ListBucket so existence checks succeed","Document bucket name in deployment configuration to avoid typos"],"tags":["s3","bucket-not-found","configuration","aws"],"backgroundTag":"resource-not-found","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}