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
已提問 1 年前檢視次數 364 次
1 個回答
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
專家
Kallu
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南