# boolean_smtp_ses_iam_credentials

> Filters the predefined IAM credentials available for SES connections to select from.

Filter · Tier B · Since 1.0.0

Used to resolve the access key and secret for a connection that selected a predefined credential through the `iam_selector` setting instead of entering keys directly; see `boolean_smtp_ses_iam_selector` for where the selectable list is populated. Return the credentials, keyed by the same selector id, each with `access_key` and `secret` values.

## Signature

```php
add_filter( 'boolean_smtp_ses_iam_credentials', $callback, 10, 1 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$credentials` | `array<string, array{access_key: string, secret: string}>` | IAM selector id mapped to its access key and secret; empty by default. |

**Returns** `array<string, array{access_key: string, secret: string}>` — The filtered credentials.

## Fires in

- [app/Services/Mailer/Transports/SesTransport.php:566](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/Transports/SesTransport.php#L566) — `BooleanSmtp\Services\Mailer\Transports\SesTransport::resolveModeSettings()`

## Example

```php
add_filter( 'boolean_smtp_ses_iam_credentials', function ( array $credentials ) {
    return $credentials;
}, 10, 1 );
```
