Is it possible to specify a log folder within S3 LoggingConfiguration using CloudFormation?

0

I am trying to create an S3 bucket using CloudFormation, but it does not appear possible to log to a specific folder unless performed through the portal. When appending the folder to the bucket name in the DestinationBucketName property an error is thrown while creating the stack. Only the bucket name works, which means the logs will be created in the root folder.

Tom
asked a year ago350 views
1 Answer
0

Yes, you can. "Folder" is set in LogFilePrefix, not as a part of DestinationBucketName.

  DestinationBucketName: String
  LogFilePrefix: String

See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-loggingconfig.html

profile picture
EXPERT
Kallu
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions