How to use AWS Batch with AWS embedded metrics?

0

Hi,

I would like to use the "embedded metrics format" feature in AWS Batch jobs with managed compute environments. In the documentation it says that I should install the CloudWatch agent on the ECS host, however I do not have access to the specified configurations (e.g. port mappings) since it is Batch who manages the environment. There are also multiple docker containers running the multiple instances of my job on the same host.

So, from my docker image I can do:

		MetricsLogger metrics = new MetricsLogger();
		metrics.putDimensions(DimensionSet.of("Service", "Aggregator"));
		metrics.putMetric("ProcessingLatency", 100, Unit.MILLISECONDS);
		metrics.putProperty("RequestId", "422b1569-16f6-4a03-b8f0-fe3fd9b100f8");
		metrics.flush();

However I'm having trouble configuring the CW agent to read these metrics/logs in a Batch managed environment.

So I have two questions:

  1. Is it possible to use AWS Batch with managed compute environments and also use the AWS Embedded Metrics feature?
  2. If yes, is there an example somewhere with how?

Thanks!

filipg
asked 2 years ago81 views
No Answers

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