title: AWS SES: Adding a topic to an existing contact list (NotFoundException - List doesn't contain Topic)
body: <p>I have a SES (AWS Simple Email Service) contact list where each contact has a list of topic preferences, e.g.</p>
  <pre class="lang-json prettyprint-override"><code>// aws sesv2 get-contact-list --contact-list-name my_contact_list
  
  {
    &quot;ContactListName&quot;: &quot;my_contact_list&quot;,
    &quot;Topics&quot;: [
      {
        &quot;TopicName&quot;: &quot;transactional_emails_1&quot;,
        &quot;DisplayName&quot;: &quot;...&quot;,
        &quot;Description&quot;: &quot;...&quot;,
        &quot;DefaultSubscriptionStatus&quot;: &quot;OPT_IN&quot;
      },
      {
        &quot;TopicName&quot;: &quot;transactional_emails_2&quot;,
        &quot;DisplayName&quot;: &quot;...&quot;,
        &quot;Description&quot;: &quot;...&quot;,
        &quot;DefaultSubscriptionStatus&quot;: &quot;OPT_IN&quot;
      }
    ],
    &quot;CreatedTimestamp&quot;: &quot;2022-04-12T11:40:48.061000+01:00&quot;,
    &quot;LastUpdatedTimestamp&quot;: &quot;2022-05-12T11:01:13.596000+01:00&quot;,
    &quot;Tags&quot;: []
  }
  </code></pre>
  <p>And when I list the contacts:</p>
  <pre class="lang-json prettyprint-override"><code>// aws sesv2 list-contacts --contact-list-name my_contact_list
  
  {
    &quot;EmailAddress&quot;: &quot;name.surname@example.com&quot;,
    &quot;TopicPreferences&quot;: [
      {
        &quot;TopicName&quot;: &quot;transactional_emails_1&quot;,
        &quot;SubscriptionStatus&quot;: &quot;OPT_IN&quot;
      }
    ],
    &quot;TopicDefaultPreferences&quot;: [
      {
        &quot;TopicName&quot;: &quot;transactional_emails_2&quot;,
        &quot;SubscriptionStatus&quot;: &quot;OPT_IN&quot;
      }
    ],
    &quot;UnsubscribeAll&quot;: false,
    &quot;LastUpdatedTimestamp&quot;: &quot;2022-05-16T09:14:16.483000+01:00&quot;
  }
  </code></pre>
  <p>I would now need to add a new topic to the contact list. However, I can't find any way to update the list, or the existing contacts in that list.</p>
  <p>When I try to send an email to that list with a new topic, I get this error:</p>
  <pre><code>&quot;An error occurred (NotFoundException) when calling the SendEmail operation: List: my_contact_list doesn't contain Topic: transactional_emails_3
  </code></pre>
  <p>What I would end up with is a situation where the contact list contains the new topic (transactional_emails_3) and each user in that list is subscribed to it:</p>
  <pre class="lang-json prettyprint-override"><code>// aws sesv2 get-contact-list --contact-list-name my_contact_list
  
  {
    &quot;ContactListName&quot;: &quot;my_contact_list&quot;,
    &quot;Topics&quot;: [
      {
        &quot;TopicName&quot;: &quot;transactional_emails_1&quot;,
        &quot;DisplayName&quot;: &quot;...&quot;,
        &quot;Description&quot;: &quot;...&quot;,
        &quot;DefaultSubscriptionStatus&quot;: &quot;OPT_IN&quot;
      },
      {
        &quot;TopicName&quot;: &quot;transactional_emails_2&quot;,
        &quot;DisplayName&quot;: &quot;...&quot;,
        &quot;Description&quot;: &quot;...&quot;,
        &quot;DefaultSubscriptionStatus&quot;: &quot;OPT_IN&quot;
      },
     {
        &quot;TopicName&quot;: &quot;transactional_emails_3&quot;,
        &quot;DisplayName&quot;: &quot;...&quot;,
        &quot;Description&quot;: &quot;...&quot;,
        &quot;DefaultSubscriptionStatus&quot;: &quot;OPT_IN&quot;
      }
    ],
    &quot;CreatedTimestamp&quot;: &quot;2022-04-12T11:40:48.061000+01:00&quot;,
    &quot;LastUpdatedTimestamp&quot;: &quot;2022-05-12T11:01:13.596000+01:00&quot;,
    &quot;Tags&quot;: []
  }
  </code></pre>
  <p>Can it be done using the AWS SDK (SESv2 API)?</p>