Generate aws provider endpoints dynamically

Hello all, hoping someone can point out what I’m doing wrong here, I’m trying to generate endpoints for the AWS provider dynamically so I don’t have to repeat them. However I can’t seem to figure out how to generate the “key” dynamically (since a map is being passed in. Any idea what I’m doing wrong here?

provider "aws" {
  region = "us-east-1"
  dynamic "endpoints" {
    for_each = tomap(local.fips_endpoints_us_east_1)
    content {
      endpoints.key = endpoints.value

the local looks something like this at the moment:

 fips_endpoints_us_east_1 = {
    acm              = ""
    acmpca           = ""
    apigateway       = ""
    appstream        = ""
    cloudformation   = ""
    cloudfront       = ""
    cloudtrail       = ""

Have you tried using:

endpoints = locals.fips_endpoints_us_east_1 ?

endpoints is a block so that doesn’t seem to work

 endpoints = local.fips_endpoints_us_east_1

An argument named "endpoints" is not expected here. Did you mean to define a
block of type "endpoints"?