Skip to content

Commit

Permalink
Merge pull request #947 from itsmepetrov/master
Browse files Browse the repository at this point in the history
Take Bucket Ref into account
  • Loading branch information
ar90n authored Aug 20, 2024
2 parents 16293d8 + e9eb236 commit 5053509
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions serverless-s3-local/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,11 @@ class ServerlessS3Local {
}

getResourceForBucket(bucketName) {
const logicalResourceName = `S3Bucket${bucketName
.charAt(0)
.toUpperCase()}${bucketName.substr(1)}`;
const logicalResourceName = bucketName.Ref
? bucketName.Ref
: `S3Bucket${bucketName
.charAt(0)
.toUpperCase()}${bucketName.substr(1)}`;
return this.service.resources && this.service.resources.Resources
? this.service.resources.Resources[logicalResourceName]
: false;
Expand Down

0 comments on commit 5053509

Please sign in to comment.