I am trying to pass my data from s3 to elasticsearch 1
THE FILES ARE IN S3.
this is my config file
input {
s3 {
bucket => "awsesbucket1rec"
access_key_id => "AKIAVU3QDW2HVZ2NFV6I"
secret_access_key => "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"
region => "us-east-1"
codec => "json"
}
}
filter{
mutate{
add_field =>{
"file" => "%{[@metadata][s3][key]}"
}
}
mutate {
gsub => [ "file", ".\w{3}", "", "file", "([0-9]{4}-[0-9]{2}-[0-9]{2})-[0-9]+", "\1" ] }
}
output {
amazon_es {
hosts => ["https://vpc-log-service-legacy-data-lm4aq2wmxzh4xxj2uukkucykfi.us-east-1.es.amazonaws.com"]
region => "us-east-1"
aws_access_key_id => 'AKIAVU3QDW2HVZ2NFV6I'
aws_secret_access_key => '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'
index => "%{file}"
template_name => "sqe_template"
template_overwrite => "true"
codec => "json"
}
}
and this is my data
[{"SessionID":"304257638164423-16b15e39fdd-92a7fa40-3590-471f-8b3b-a1d34438e5c9","Study":"eCOA261_2019JAN04","Locale":"en_US","ProdVer":"2.0.0","StudyVer":"1.0.0","Sponsor":"ERT","Device":"3535","SubjectID":"no subject data","Type":"SessionStart","Level":"INFO","Message":"Session","Source":"Web App","Location":"actions.transmitLogs","Site":"0009","Environment":"2.6.1 (pht-syn-study06 : eCOA261_2019JAN04)","EnvironmentID":"staging","Role":"site","KRPT":"no subject data","EventOrder":"17","UserID":"442","SigID":"undefined","Protocol":"TestStudy","ClientTime":"2019-06-02T01:52:47.580"},{"SessionID":"304257638164423-16b15e39fdd-8b4a517d-769a-4376-8b23-e5a5b61e0efb","Study":"eCOA261_2019JAN04","Locale":"en_US","ProdVer":"2.0.0","StudyVer":"1.0.0","Sponsor":"ERT","Device":"3535","SubjectID":"no subject data","Type":"SessionStart","Level":"INFO","Message":"Session","Source":"Web App","Location":"actions.transmitLogs","Site":"0009","Environment":"2.6.1 (pht-syn-study06 : eCOA261_2019JAN04)","EnvironmentID":"staging","Role":"site","KRPT":"no subject data","EventOrder":"16","UserID":"442","SigID":"undefined","Protocol":"TestStudy","ClientTime":"2019-06-02T01:52:47.580"}]
I get errors if I pass it in this format, do I change the format or change the configuration file for logstash?