I struggled with this for a few hours.
The only dependency you need besides actuator is io.awspring.cloud:spring-cloud-aws-starter-metrics
Then in application.properties
you need to set your namespace with management.cloudwatch.metrics.export.namespace
You can see the other properties in the official documentation: https://docs.awspring.io/spring-cloud-aws/docs/3.2.0/reference/html/index.html#configuring-credentials