In part 1 of this series, we discussed some AWS services that work well with MuleSoft. Many of these are serverless and can be easily integrated with MuleSoft’s connectors. It’s important to understand the AWS services that work well with MuleSoft, and how they can be used in practice. In the second part of this series, we’ll dive into some real-world use cases for combining MuleSoft and AWS.
Common hybrid use cases
We’ve come across multiple cases where using AWS and MuleSoft together leads to a more robust and easier-to-maintain solution.
For instance, when clients have needed a scalable, stable, and reliable message queue paired with long-term file storage, combining AWS and MuleSoft made sense. The resulting solution processes millions of files a day and minimizes support needs.
This is just the beginning. Layering these two technologies vastly expands the solution landscape of both. Below are some additional examples of situations where AWS and MuleSoft, combined, create a more significant outcome than either alone:
- Logging/auditing: MuleSoft logging can be sent to an external target such as ElasticSearch in AWS, allowing for fast full-text searches even in large logs.
- Databases (NoSQL and relational): Use AWS for data storage with a choice of either relational or NoSQL databases.
- APIs: When there is an organizational mandate to use a single technology for APIs, AWS’s API Gateway can interface with MuleSoft to fulfill the requirement.
- SFTP server: AWS S3 can be used as a scalable cloud SFTP server that MuleSoft can interact with.
- Messaging: AWS SQS and SNS can be used as your messaging layer from MuleSoft for queues and topics.
- Hosting for MuleSoft: If you’re not using MuleSoft’s cloud, AWS’s EC2 and load balancers, VPCs, and general networking can stand in to house your MuleSoft instances.
- CI/CD: All MuleSoft implementations need DevOps best practices, including CI/CD. Combine with AWS CodePipeline, CodeBuild, and CodeDeploy to implement proper CI/CD for your MuleSoft APIs and integrations.
Diving deeper into three MuleSoft and AWS use cases
There are plenty of opportunities to use AWS and MuleSoft together. Below we’ve further detailed three of these, from simple to complex, to illustrate further the benefits of putting these two technologies together.
Data storage
As mentioned, MuleSoft purposely doesn’t offer data storage outside of quick hit key/value objects using Object Store. However, there are plenty of cases where data storage is necessary.
Amazon RDS offers a relational database solution that can be combined with MuleSoft that can be easily managed and scaled from within AWS. It’s highly available, monitored, and MuleSoft can easily read, write, update, delete, and execute stored procedures on the database as needed.
Best practice would dictate a MuleSoft System API to be stood up in front of the database. Access could then be monitored, secured, and controlled through the MuleSoft System API.
Messaging
At certain tiers, MuleSoft comes out of the box with Anypoint MQ included. Some organizations, however, may not have access to the queuing technology or may be restricted, such as in GovCloud. In almost all integration use cases, though, queues and topics are necessary for messaging and delivering files, notifications, and transactions.
In these cases, Amazon SQS and SNS can be used in place of MuleSoft’s Anypoint MQ. SQS satisfies the reliability pattern, decouples application components, guarantees delivery, automates retries, and includes some monitoring capabilities. SNS can hook in multiple subscribers to a single event.
Even better, MuleSoft comes with SQS and SNS connectors, making it simple to leverage these technologies for your messaging applications.
SFTP Server
While MuleSoft inherently interacts well using the SFTP protocol, it is not meant to be an SFTP server itself. For secure SFTP communications, an SFTP server must be stood up to transact using the SFTP protocol.
Amazon S3 can be used to create an SFTP server. From there, MuleSoft can use the S3 connector to pick up files from S3 directly or get files using the SFTP protocol, querying to see if there are new files every minute or so and then acting on any file updates.
A real-time, push solution is possible, as well. You could trigger SFTP files landing in S3 from AWS using AWS Lambda API requests to MuleSoft if you build a MuleSoft API that can accept file content. If you want to leave the file in S3 for pickup by MuleSoft, you could also put messages on a queue or topic with MuleSoft listening to an SQS queue or subscribing to an SNS notification so that MuleSoft knows that a file on S3 is ready to be processed.
A solution like this requires two things. First, a trigger in AWS to be configured for invoking a Lambda function upon S3 file creation. Second, a MuleSoft entry point, such as:
- API (HTTPS)
- SQS
- SNS
In either case, S3 is acting as the SFTP server. Configuration is done on AWS to house the SFTP server while leveraging MuleSoft to process and route files.
Get started with MuleSoft and AWS today
In the interest of using a single solution to solve a problem, we frequently find ourselves trying to fit a square peg in a round hole. But in doing so, we create technical debt or develop overly complicated implementations. Many times, the better option is to combine two technologies that, together, build a great solution. Using MuleSoft and AWS together lets each platform’s strengths shine through, paving the way for simple, straightforward, elegant solutions to a myriad of technical challenges.
Learn more about how to extend AWS capabilities with MuleSoft or watch our demo.