Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit e9eb236

Browse files
committed
Take Bucket Ref into account
1 parent 16293d8 commit e9eb236

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

serverless-s3-local/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,11 @@ class ServerlessS3Local {
505505
}
506506

507507
getResourceForBucket(bucketName) {
508-
const logicalResourceName = `S3Bucket${bucketName
509-
.charAt(0)
510-
.toUpperCase()}${bucketName.substr(1)}`;
508+
const logicalResourceName = bucketName.Ref
509+
? bucketName.Ref
510+
: `S3Bucket${bucketName
511+
.charAt(0)
512+
.toUpperCase()}${bucketName.substr(1)}`;
511513
return this.service.resources && this.service.resources.Resources
512514
? this.service.resources.Resources[logicalResourceName]
513515
: false;

0 commit comments

Comments
 (0)