Can't connect my Home Assistant to AWS IoT Core: service "mqtt.publish" not found

Hi everyone,
I am trying to create a simple test automation to send some data from the home assistant to my AWS environment. I have created a Thing in AWS IoT Core and loaded the cert and private key into a specific directory.
This is my configuration.yaml file:

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

# Configurazione MQTT
mqtt:
  broker: "XXXXXXXX.iot.eu-west-1.amazonaws.com"
  port: 8883
  tls_insecure: false
  protocol: 3.1
  client_cert: "path to local certificate.pem.crt"
  client_key: "path to local private.pem.key"
  certificate: "path to local AmazonRootCA1.pem"

and this is my vanilla automations.yaml:

- alias: Send Data to AWS IoT
  trigger:
    - platform: time_pattern
      seconds: '/10'
  action:
    - service: mqtt.publish
      data:
        topic: "aws-iot/test-topic"
        payload_template: '{"topic": "aws-iot/test-topic", "timestamp": "{{ as_timestamp(now()) }}"}'

I have not configured anything in the Devices and Services menu since I’ve read that it is not necessary for AWS IoT to pass through mosquitto or another mqtt configuration if you set it up through configuration.yaml.

However, when I restart my device I get this error for the automation:

The automation “Send Data to AWS IoT” (automation.send_data_to_aws_iot) has an unknown action: mqtt.publish.
This error prevents the automation from running correctly. Maybe this action is no longer available, or perhaps a typo caused it.

and if I let Home Assistant built-in tool check my yaml file I find out that it has the following errors:

Can someone help me? I’ve tried my best but I am not able to troubleshoot this by myself.

Any help would be very appreciated,

thanks

The mqtt broker is not configured any more in configuration.yaml. It is configured using the UI these days.

I tried to configure MQTT through UI but I couldn’t find any place to load certs, keys, and so on.
Can you provide me a guide (if there is one) on the configuration?