Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Migrating from Amazon Simple Email Service API V1 to V2

I'm interested in the new feature that allows me to send attachments in my email. Previously, my flow sent the temporary public link to see the result of my merged PDF. However, it may not be the case! So, I'll try to move to the V2…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

I'm interested in the new feature that allows me to send attachments in my email. Previously, my flow sent the temporary public link to see the result of my merged PDF. However, it may not be the case!



So, I'll try to move to the V2 API.



Hooray GIF






Reference








Installing the new SDK and removing the previous SDK



I changed the SDK dependency from V1 to V2.




  • Reference:




-    <PackageReference Include="AWSSDK.SimpleEmail" Version="3.7.402.82" />
+ <PackageReference Include="AWSSDK.SimpleEmailV2" Version="3.7.410.12" />







Changing the code



Previously, I had a feature flag for using HTML format. However, I will remove it and use the HTML format as the default. You may refer to my previous session regarding the feature flag presentation. I haven't written it yet. Please let me know if you want me to share it. Previously limited to AWS Commnity Indonesia event.









Bervianto Leo Pratama's Speaker Profile @ Sessionize



Passionate Software Engineer who loves to learn DevOps, Microservices, and Cloud Computing...



favicon
sessionize.com






Let's focus on the required changes. I've added some improvements to my repository for readability.




  • Updating the reference from V1 to V2.




- using Amazon.SimpleEmail;
+ using Amazon.SimpleEmailV2;
- using Amazon.SimpleEmail.Model;
+ using Amazon.SimpleEmailV2.Model;









-            services.AddAWSService<IAmazonSimpleEmailService>();
+ services.AddAWSService<IAmazonSimpleEmailServiceV2>();









-        private readonly IAmazonSimpleEmailService _amazonSimpleEmailService;

+ private readonly IAmazonSimpleEmailServiceV2 _amazonSimpleEmailService;

- _amazonSimpleEmailService = new AmazonSimpleEmailServiceClient(region);

+ _amazonSimpleEmailService = new AmazonSimpleEmailServiceV2Client(region);






Complete changes, you may refer to these commits changes.






Examine the result



Run Duration and Memory




Duration: 12664.70 ms   Billed Duration: 12665 ms   Memory Size: 512 MB Max Memory Used: 322 MB Init Duration: 567.43 ms    






Well, of course, there are some side effects.




  • First, long running duration. So, it means increase the billing! I'll evaluate this change; if needed, I will move the operation (sending the attachment) to another service.

  • Second, the memory used is increasing. Well, it's expected, because I will need to download the whole PDF to my Lambda. Of course, I may need to move the workload or reuse the merged file. So, it's not only uploading to the S3, but also using the file for the attachment. Currently, I use a bad approach, which downloads the uploaded file into S3, which increases the network call. The better approach is to reopen the file and upload it again.



However, I'll still evaluate the current state. When necessary, I'll do more enhancements to my existing environment. So, at least, I will need to reduce the workload time.



Note:




  • Sadly, my attachment (the PDF) gives multiple blank pages. Most likely, I lost some metadata after uploading the file. Which is not the case when I use the temporary link.



Blank Pages



I'll try to find out later. :(



Sad GIF

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Migrating from Amazon Simple Email Service API V1 to V2

Thematisch verwandte Begriffe: Migrating, from, Amazon, Simple · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-101042 | Parse Server is an open-source backend server. In versions >= 9.0.0 < 9…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag