AWS Bites Podcast

86. How do you integrate AWS with other clouds?

Are you struggling with securely integrating workloads running on-premises, in Azure, or in any other cloud with a workload running in AWS?

In this exciting episode of the AWS Bites podcast, we dive into 6 different options for securely and efficiently integrating workloads between clouds. From providing a public API in AWS with an authorization method to using IAM roles anywhere to using OIDC federated identities, we explore the advantages and disadvantages of each option. We even cover the use of SSM hybrid activations and creating the interface on the Azure/Data Centre side and polling from AWS.

Don't miss out on this informative discussion about the best practices for integrating workloads between clouds. Tune in now and let’s have some cloud fun together!

AWS Bites is sponsored by fourTheorem, an AWS Consulting Partner offering training, cloud migration, and modern application architecture.

In this episode, we mentioned the following resources:

Let's talk!

Do you agree with our opinions? Do you have interesting AWS questions you'd like us to chat about? Leave a comment on YouTube or connect with us on:

00:04:01

So maybe one of the easiest ways or most understood ways is to put a public API in the AWS side with an authorization method. And that could be something like a API key. And then you just share the API key with the external side. You can use IAM authorization on that API, but you still have to figure out how to get that IAM session. Or you can use OAuth or OIDC and get a token that way. And that allows you for secure integration, but it makes the integration side fairly easy and understood because most people will understand how to call an API. So it's a fairly common way of doing it. So on the AWS side, you could use API gateway. API gateway allows you to provision API keys and share them with your clients. If you wanted to, you could go with more of a secure approach using an authorizer like an OIDC authorization. Then you need to configure the clients correctly to have some client ID in secret, for example, to be able to perform an OIDC flow and obtain credentials. Similarly, if you just wanted to go with IAM authorization, you have to figure out some way of getting IAM credentials. So I suppose a lot of the other options we're going to go through are going to cover getting IAM credentials anyway, whether you use the API gateway approach or not. But the advantage of an OIDC approach, if you already have an identity provider, is that you can hook it into that method and get a JWT token that they can use and attach it to the request. So that's public API method. Let's talk a little bit more about IAM. And I suppose the first thing people would reach for when they think about IAM is an IAM user, but we often talk about how this is discouraged. So what do you think? Is it a viable option?

Luciano
00:05:37

I think it's definitely the simplest one. So for very simple integrations, it's probably the one that I've seen the most, even historically. The idea is that you just go to your own AWS console, you create a user, you create credentials for this user, then somehow you propagate these credentials to your client. And then your client is basically just doing using the SDK or the CLI with these credentials. Sometimes you can make it a little bit better by just creating an external role and you give to that particular user only permissions to assume the role. At least you have another extra step where you can track exactly when the system is assuming the role. And therefore we have a little bit more control and more visibility on the actions that are happening there. But with that, you can also have proper logging and alerting, and you can try to set up automated key rotation to make it a little bit more secure. In reality, I've seen that when you have to do all these things, people just say it works and you end up with long-lived credentials, which at some point might become a very serious security liability. So this is something that brings us to explore other options just because this can be very convenient and very easy, but also to make it secure requires so much more work. So the risk is that you just stop yourself at the first step, it works, and don't make it secure until eventually maybe you have an incident in production. So just be aware that this solution is always a bit tricky, looks simple, but it's dangerous. So let's figure out if there are other options that maybe take a little bit more time to be set up, but then they will be more secure by default.

00:15:10

But it works in this case as well because you can just install the SSM agent on the Azure side or in your data center. Then you go into AWS and with any of the usual ways, you can create this activation resource and the activation resource will be linked to an IAM role. It needs some specific SSM related permissions and then whatever other permissions you need for your use case. Once you create that activation, you get a code and an ID. So these are kind of your secrets in this case. And when you start the SSM agent on the instance, you provide that code and ID, it will register the instance in SSM and all of a sudden it'll appear in your SSM console and you can shell into it if you turn on that option or you can just do run command. And if you have this role and you have SSM agent running on your Azure instance, then all of a sudden you can do a run command from the AWS side and that can trigger some logic on the Azure side, which can then call back to AWS with the permissions you've given it. And that would achieve our goal as well. Now the SSM hybrid activations, there's two tiers, standard tiers, free for up to a thousand instances. Then the advanced tier starts to get a bit spicy in terms of cost. So I think it looks like $5 per instance per month. So if you wanted, I think you don't need that for generally the kind of case we're talking about. So don't worry too much, but just be aware, like if you want to actually SSM into your instances using start session, you need the advanced mode and that's when it can get expensive if you've got a lot of instances. So what else have we got?

00:17:18

Nothing is really stopping us to use that approach. So the idea could be that rather than implementing an API in AWS, which is the option one we explored today, we could implement an API in the other side. Let's say it's Azure. On Azure we can expose an API and then from AWS we call that API to start to trigger some kind of integration. Again, you still need to figure out some kind of authentication because if that Azure API is running on the public, is exposed on the public internet, then potentially anyone could call it. So you might still want to make sure that it's only your trusted AWS side that is actually calling that API and sending data that you can actually trust. But that might not be the only way of solving this problem because maybe that connection is not really on the public internet. Maybe you have some kind of private network connection and maybe you can just trust that that network connection is good enough to give you guarantees that it's fine. Maybe you are, I don't know, white listing IP addresses or maybe you have some other form of network security. In general, I think today we focused on more of a zero trust approach where every call is authenticated strongly with tokens and specific mechanisms where you are never assuming that the network is secure. So I think we had a little bit of a bias towards this kind of solutions, but I think there is an entire realm of more kind of network-based security approaches that could be considered as well. I don't know if you have any idea in that sense, but I think that that's also worth calling out anyway.

Help us to make this transcription better! If you find an error, please submit a PR with your corrections.