Reputation: 7855
When I try to create a subdirectory on my serverless.yml
, I get the following error:
An error occurred: S3Bucket - Bucket name should not contain '/'.
Here’s the code:
resources:
Resources:
S3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: "bucketname/sub"
How can I create bucket subdirectories through serverless.yml
?
Upvotes: 4
Views: 2167
Reputation: 4002
You can only create S3 bucket using serverless framework. Any folder/object can only be created using SDK or console.
Upvotes: 4
Reputation: 4616
AWS S3 buckets don't have directories, they just appear to when a filename has a /
in it.
See this question.
Upvotes: 2