I have setup fly-log-shipper to ship the logs from my Fastify API server, which emit logs in JSON format, to AWS CloudWatch. What I observe in CLoudWatch is that the log entries from the app are converted to stringified JSON, because they are inside another JSON object emitted by the fly-log-shipper. Is there a way to configure fly-log-shipper to just ship the original message without adding its own “fluff?
FWIW, below is the fly.toml file that I used to deploy fly-log-shipper:
Can you try this branch of the log shipper? You’ll need to update the fly.toml and set CLOUDWATCH_ENCODING_CODEC to “raw_message”. If that doesn’t work, other formats are here.
09:57:04Configured sinks:
09:57:042026-03-06T09:57:04.698811Z INFO vector::app: Log level is enabled. level="vector=info,codec=info,vrl=info,file_source=info,tower_limit=trace,rdkafka=info,buffers=info,lapin=info,kube=info"
09:57:042026/03/06 09:57:04 INFO SSH listening listen_address=[fdaa:2e:b3af:a7b:56:187e:18e:2]:22
09:57:042026-03-06T09:57:04.715729Z INFO vector::app: Loading configs. paths=["/etc/vector/vector.toml", "/etc/vector/sinks"]
09:57:052026-03-06T09:57:05.285610Z INFO vector::topology::running: Running healthchecks.
09:57:052026-03-06T09:57:05.285988Z INFO vector::topology::builder: Healthcheck passed.
09:57:052026-03-06T09:57:05.286051Z INFO vector::topology::builder: Healthcheck passed.
09:57:052026-03-06T09:57:05.286965Z INFO vector: Vector has started. debug="false" version="0.29.1" arch="x86_64" revision="74ae15e 2023-04-20 14:50:42.739094536"
09:57:052026-03-06T09:57:05.294566Z INFO vector::sinks::prometheus::exporter: Building HTTP server. address=[::]:9598
09:57:052026-03-06T09:57:05.302435Z INFO vector::sinks::blackhole::sink: Collected events. events=0 raw_bytes_collected=0
09:57:052026-03-06T09:57:05.304477Z INFO vector::internal_events::api: API server running. address=[::]:8686 playground=http://:::8686/playground
I reverted for now. Please let me know if I’ve done something wrong.
It looks like you are still using image = ‘flyio/log-shipper:latest’. You’ll need to follow my previous instructions. git clone ... fly-log-shipper, checkout the cloudwatch-encoding branch, etc. I’ll can probably merge this change but wanted some verification it actually works/helps.
I went ahead and merged the changes so that flyio/log-shipper:latest contains the updates for Cloudwatch encoding. Please test @virasasan and let me know.
First things fist: the app is running under the an org, which is not a personal org. I tried running the log shipper under the same org, but it was complaining about ACCESS_TOKEN not being set, which it was, so I deleted the log shipper app and re-created it under the personal org. Now it fails with the following error:
ERROR vector::cli: Configuration error. error=missing field `codec`
fly secrets set \
ORG="<org slug for the org under which the app is>" \
ACCESS_TOKEN="<token from the above command>" \
AWS_ACCESS_KEY_ID="..." \
AWS_SECRET_ACCESS_KEY="..." \
AWS_REGION="..." \
CLOUDWATCH_LOG_GROUP_NAME="..." \
CLOUDWATCH_ENCODING_CODEC='raw_message' \
-a fly-log-shipper-artextasia-api-prod
have confirmed these 7 secrets are listed on the app’s dashboard page.