Cover of the book Symfony 5: The Fast Track

Symfony 5: The Fast Track is the best book to learn modern Symfony development, from zero to production. +300 pages showcasing Symfony with Docker, APIs, queues & async tasks, Webpack, SPAs, etc.

New in Symfony 5.1: Async AWS Support

Contributed by
Jérémy Derussé and Tobias Nyholm
in #35992 and #36094.

The official AWS SDK for PHP simplifies the integration of Amazon AWS services (Amazon S3, Amazon DynamoDB, etc.) in your PHP applications. This SDK is feature complete, providing support for more than 200 AWS services (via 8,000 methods).

The Async AWS project is an unofficial reimagination of the AWS SDK. It provides support only for the most used services (7 vs 200 in the official SDK) and is split into multiple small packages (adding S3 support in your app requires 0.6 MiB vs the 22 MiB required by the official SDK).

However, the biggest difference is that in Async AWS, all API calls are asynchronous by default (thanks to the underlying Symfony HTTP Client used by the project).

Thanks to the recent work made by Tobias Nyholm and Jérémy Derussé (15 weeks, 500 pull requests and tens of thousands of lines of code), Async AWS has recently tagged its 1.0.0 stable version. In Symfony 5.1 we decided to start using Async AWS by default in some components.

In the Mailer component, we've deprecated the SesApiTransport and SesHttpTransport classes in favor of SesApiAsyncAwsTransport and SesHttpAsyncAwsTransport, which are created when installing the following package:

1
$ composer require async-aws/ses

In addition to removing the complexity of signing requests, this change adds the following features:

  • Authentication via .aws/config.ini, Instance profile and WebIdentity (K8S service account);
  • Uses Signature V4 (the one recommended by the official SDK);
  • Full compatibility with the official API (it uses the official AWS SDK interface contract to generate classes).

Similarly, the Messenger component has been updated to use Async AWS when using Amazon SQS service. This removes most of the authentication/streaming complexity and keeps using the Symfony HttpClient integration.

Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.

Comments

Awesome ! 👏
Thanks for the great work
Well done!!! ♥️
Thanks for your work, this is awesome!
Great news ! Thanks for this support.
Great!

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.