I tried to create splunk logging in AWS ECS FARGATE but it doesn't work.
Please kindly let me know what's wrong with my code below.
Many thanks in advance!
$LogOptions=New-Object "System.Collections.Generic.Dictionary[System.String,System.String]"
$LogOptions.Add('splunk-token','xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
$LogOptions.Add('splunk-sourcetype','_json')
$LogOptions.Add('splunk-source','fargate')
$LogOptions.Add('splunk-format','raw')
$containerLogConfiguration = New-Object -TypeName Amazon.ECS.Model.LogConfiguration
$containerLogConfiguration.LogDriver = [Amazon.ECS.LogDriver]::Splunk
$containerLogConfiguration.Options = $LogOptions