Loading

How Ryanair used S3 Object Lambda to deliver their COVID-19 wallet

Sponsored Content

On 10-Mar-2021, Ryanair launched a new Covid-19 Travel Wallet, which is available from their mobile application. Ryanair customers can use the Covid-19 Travel Wallet to upload their negative PCR tests, Covid vaccination certificates, and other Covid documents that may be required for EU travel. Documentation uploaded by customers is securely stored in Amazon S3.

While allowing a single point to store and associate all Covid-19 documents to a passenger boarding pass, it also provided peace of mind in case the hardcopy was lost on the way or while navigating through the airport. This new feature included functionality inside the boarding pass that could be used at the gate by the staff to check the digital version or the hard copy.

S3 Object Lambda and the Ryanair Covid-19 mobile wallet

When you store data in Amazon S3, you can easily share it for use by multiple applications. However, each application has its own requirements and may need a different view of the data. For example, a dataset created by an e-commerce application may include personally identifiable information (PII) that is not needed when the same data is processed for analytics and should be redacted. On the other side, if the same dataset is used for a marketing campaign, you may need to enrich the data with additional details, such as information from the customer loyalty database.

With S3 Object Lambda, you can add your own code to S3 GET requests to modify and process data as it is returned to an application. This allows developers to use AWS Lambda functions to modify the data returned by standard S3 GET requests to filter rows, dynamically resize images, redact confidential data, and much more.

In the case of Ryanair, this new feature allowed a shift in the development effort into the backend in AWS rather than spending significant development effort in the mobile app. This allows their mobile app customers to store all Covid-19-related travel documentation in a centralised place within the application.

When downloading documentation from S3, conversion of PDF file types happens on the S3-GET request to ensure a standardised image format within the mobile application.

When customers request their boarding pass within the mobile application, a request goes to Amazon API Gateway, which initiates an associated AWS Lambda function to validate the request and authorise the process. The boarding pass is then generated with S3 public URLs and an associated TTL. The app will then be responsible for downloading all images to display at the boarding gate and/or border control.

"As early adopters we felt this was simple to integrate in a few hours for a single developer and worked smoothly," said Joaquim Oliveira, Head of Mobile Development, Ryanair Labs, "For specific use cases it provides a useful extra layer for our serverless solutions."

Architecture diagram of the Ryanair COVID-19 mobile wallet with S3 Object Lambda

Ryanair.jpg" alt="" width="651" height="434" />

Ryanair COVID-19 and S3 Object Lambda architecture explained

  1. Mobile app requests information for the reservation.
  2. API Gateway triggers AWS Lambda with the information supplied.
  3. Lambda generates boarding passes and S3 URLs for PDF COVID files.
  4. App requests COVID documents using the returned S3 Access point URLs.
  5. S3 Object Lambda checks if the PDFs have already been converted, if so, respond.
  6. If the PDF was not already converted to an image, Lambda converts, stores and responds with the image.

Reducing development effort

By shifting this logic to AWS and leveraging S3 Object Lambda, Ryanair was able to include PDF files without any app changes in under 3 days. Customers can use the Ryanair mobile app to move through a booking quickly. The Ryanair team initially evaluated S3 Event Notifications to invoke a Lambda function, but the time between the user uploading Covid-19 wallet documents and requesting the COVID documents wasn't long enough for the invoke to be completed, which could have caused errors. This introduced another complexity level since the session time wouldn't work for the vast majority of the users. It would require the Ryanair app to keep retrying the request until the transformed document was available in the given format, and until the documents were downloaded. Along with the extra work involved it would increase the number of requests and costs across services. Using S3 Object Lambda, Ryanair are able to transform these documents in real time without any visible delay for the end users, ensuring the data is available offline while at the same time keep the running costs low.

Conclusion

In this post, we've shown you how Ryanair leveraged S3 Object Lambda to move quickly and deliver important features in 3 days to support their return to serving customers. This allows their customers to have all the documentation they need at their fingertips on arrival to their destination countries.

"S3 Object Lambda is a great new feature for S3, bringing Lambda to the S3 request, and the timing was right on time for the development of our Covid-19 Wallet," said Oliveira." It allowed us to focus on developing new features for our mobile app and left the heavy lifting for AWS, in a seamless way for our customers."

To learn more about S3 Object Lambda, visit the feature page, user guide, introductory blog post, or watch the following video.