<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kirsty Mcdonald on Medium]]></title>
        <description><![CDATA[Stories by Kirsty Mcdonald on Medium]]></description>
        <link>https://medium.com/@kirstyymac?source=rss-27edb01b4531------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*luxN8uvBlvMhQgj9</url>
            <title>Stories by Kirsty Mcdonald on Medium</title>
            <link>https://medium.com/@kirstyymac?source=rss-27edb01b4531------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:15:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kirstyymac/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[An IAM Identity Crisis — Comparing AWS and GCP Cloud IAM]]></title>
            <link>https://engineering.ferocia.com.au/an-iam-identity-crisis-comparing-aws-and-gcp-cloud-iam-1235fbe41ec9?source=rss-27edb01b4531------2</link>
            <guid isPermaLink="false">https://medium.com/p/1235fbe41ec9</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Kirsty Mcdonald]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 03:25:16 GMT</pubDate>
            <atom:updated>2025-07-23T03:36:22.688Z</atom:updated>
            <content:encoded><![CDATA[<h3>An IAM Identity Crisis — Comparing AWS and GCP Cloud IAM</h3><p>I’ve worked as a cloud engineer for many years, and for most of my career on AWS. This hasn’t been for any particular reason. I’m not an AWS fangirl but with AWS holding the largest slice of the market share pie it was typically where I ended up.</p><p>In the last couple of years, I’ve been able to get my hands stuck into another cloud provider: GCP (Google Cloud Platform). This is what we use here at Ferocia. I’ve had lots of chats about the differences between these providers, and yes the foundations are the same (you have networks, some compute and databases), albeit with some different names. The biggest mental shift for me though was understanding the Identity and Access Management (IAM) model. Understanding and managing IAM is core to what we do as cloud engineers, so I thought it was time I shared some thoughts on the differences I found moving from AWS to GCP.</p><p>I’ll be running through a bit of an overview of IAM, the core components of managing these in AWS vs GCP, and then reflect on the differences. Hopefully you will finish this blog with a better understanding of the ‘building blocks’ of setting up Cloud IAM, and how they differ between the cloud platforms.</p><h3>👯 What is IAM?</h3><p>Identity and Access Management (IAM) defines and manages who (users, services, or applications) can access what (resources, data, or services) and what actions they can perform within a cloud environment. IAM acts as the gatekeeper in our cloud environments, shouting ‘you shall not pass’ occasionally to ensure bad security things don’t happen. And just as importantly, ‘you shall pass’ to stuff so we can all do our jobs.</p><p>Considering cloud environments hold lots of very important customer data, managing IAM is a core part of any cloud team. Security concepts like least privilege access (only having the bare minimum access you need to do your job) and zero trust architecture (continuously authenticating and verifying users) can be enforced using cloud IAM.</p><h3>👩‍💻 How does IAM actually work?</h3><p>To help understand what is actually going on (now that I’ve trotted out the security buzzwords), let’s take a look at the steps the cloud providers are taking when IAM is used. From start (someone logging in), to finish (someone gaining access to data or services in the cloud).</p><ol><li>A user or application will have a set of credentials that it presents to the cloud platform. For example I login with my username and password.</li><li>The cloud platform then matches these credentials with a ‘principal’ (i.e. who are you). In the example, GCP will match my credentials to the ‘principal’ in their system (in this case I’m a user, Kirsty McDonald).</li><li>The principal will try to view/update resources, and the cloud provider will evaluate this request against a set of policies that says what permissions that principal has. In the example, I want to look at application logs in the GCP Console. When I try to load the logs, GCP will check whether I have the permissions to see these logs.</li><li>The cloud provider will either deny access, or grant access and allow the principal to perform an action. In the example, I do have permission to view logs, so I can open the log viewer in the GCP console (instead of an error message on the screen saying I couldn’t view logs if access was denied).</li></ol><p>One thing to note is that ‘principal’ here is relevant for both people logging in, and systems/applications requiring access. The same process as above will be followed when an application tries to read data from a database, or access files stored in a storage bucket.</p><p>IAM is incredibly powerful, and with the right tweaking, can give you a huge amount of confidence in building a secure cloud environment.</p><h3>🔐 What about IAM in AWS?</h3><p>The core foundations are the same across both platforms, the process I listed above is completed everywhere. The devil is in the details though. For the next bit of the blog I’ll be diving into more specific cloud resources.</p><p>In AWS there are three key AWS resources you get exposed to when managing IAM:</p><p><strong>IAM User </strong>— represents a user (or workload) that uses a username and password to login. Users have long lived credentials.</p><p><strong>IAM Role </strong>— an identity in your account that has specific permissions, it’s similar to an IAM user however instead of being tied to one person it is intended to be ‘assumable’ by anyone that needs it. It also doesn’t have long term credentials, instead it has temporary credentials for role sessions.</p><p>I’m going to use a (bad) metaphor to try and explain this, imagine you are lining up to get into an exclusive club, where the dress code is sequins every night but only cool people know that. When you try enter this club, the bouncer checks if you are wearing sequins. Of course you are, because you are cool and in the know, and so the bouncer lets you in. You can leave the club and go back in later in the night and the bouncer remembers you (this is where temporary credentials come in). If someone uncool tries to enter the club with sequins, the bouncer will reject them (this comes back to your IAM role, as you can define who can assume the role).</p><p>In AWS, you should use roles by default unless you can’ avoid it. Largely because temporary credentials are better than long-lived credentials, AWS has some much better documentation <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html">here</a> if you want to read further.</p><p><strong>IAM Policy</strong> — This is where the magic really happens, as the policies contain all the information about what types of cloud resources can be accessed by users and roles. Most policies are stored as JSON documents, and they are very flexible meaning you can be as specific or as open as you want with IAM.</p><p>If you don’t believe how flexible policies are, <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html">AWS has the full list of actions here</a> you can control via IAM policies.</p><h3>☁️ But what about GCP?</h3><p>As I said the foundations are the same, how it’s implemented and the cloud resources you create to manage IAM are different. The three key GCP resources you’ll be working with are:</p><p><strong>Google accounts / google groups</strong> — similar to IAM users above, this is to control human users who have access to GCP.</p><p><strong>Service accounts </strong>— these are just a special kind of google account used to represent applications/systems and allow them to access resources in GCP.</p><p><strong>Roles </strong>— these are collections of permissions to control which resources can be accessed (GCP has sets of predefined roles, and also allows you to create custom roles). There is less of a focus on flexibility though in GCP, and more encouragement to use the pre-defined IAM roles.</p><p>As someone coming from AWS, the first thing I tried to do when managing IAM was to grant a service account some access (let’s say it was access to send logs).</p><p>At this point I want to do a warning, if you click-ops this access in the UI it just works. I was doing it in terraform though (because Infrastructure as Code rules 🤘) and came across a terraform page that confused me <a href="https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_project_iam#google_project_iam_member-1">talking about the IAM policy for projects</a>. To attach a role to a service account, I had four different options:</p><ul><li>Google_project_iam_policy</li><li>Google_project_iam_binding</li><li>Google_project_iam_member</li><li>Google_project_iam_audit_config</li></ul><p>I remember thinking gosh I just want to grant my container access to put logs somewhere! Before I go onto to explain these different resources, we’re going to take a step back to look at how GCP structures it’s IAM permissions, and this is via the <a href="https://cloud.google.com/iam/docs/resource-hierarchy-access-control">resource hierarch</a>y.</p><p>All google cloud resources are organised hierarchically, with the organisation being the ‘root’ of it all. I’ve stolen a nice image from GCP to ​​illustrate this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*iu5ZAegXh4TWIvwo" /><figcaption>Google Cloud Platform Resource Hierarchy</figcaption></figure><p>I’ll now introduce another GCP cloud resource, the <strong>IAM policy</strong>. An IAM policy in GCP land is a collection of bindings of Principals to Roles (conveniently sharing a name with an AWS IAM policy but doing a different thing). These policies can be applied at any level in this hierarchy and are automatically <strong>inherited</strong> by all resources lower down.</p><p>Hopefully the below picture, another one lovingly leveraged from google docs, helps you to visualise what a GCP IAM policy is and how the bindings work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*dLgoEiLw7z6hVLQp" /><figcaption>Google Cloud Platform Role Bindings</figcaption></figure><p>To make this real, you can have a look at this allow policy on a project fairly easily using the cli with <em>gcloud projects get-iam-policy &lt;your-project-id&gt; </em>and you get something like the following:</p><pre>bindings:<br>- members: <br>  - serviceAccount:workload1@iam.gserviceaccount.com<br>  role: roles/cloudfunctions.serviceAgent<br>- members:<br>  - group:engineering@yourcompany.com<br>  role: roles/logging.viewAccessor</pre><p>Now we understand IAM policies, those four different ways to grant my service account access to logs will hopefully make a bit more sense. I won’t dive into the details for each of these four resources, but basically it defines how authoritative the permissions are (i.e. is my container service account the only one that can send logs).</p><p>Mostly you will be using <em>google_project_iam_member</em>, which is non-authoritative (I want all applications to be able to send logs), and more like what I was used to in AWS.</p><p>While AWS does have an organisational hierarchy, the default for IAM policy application is largely at the individual AWS account level. Permissions are evaluated against relevant policies, with explicit Deny statements taking over if they exist. If you have used AWS before you might be like hey what about AWS Organisations and Service Control Policies (SCPs). SCPs, which are used to manage permissions across the organisation, are Deny only policies, and so are managed quite different to the google resource hierarchy.</p><h3>🤷‍♀️ So…what are the differences?</h3><p>We’ve been on a bit of a whirlwind tour of IAM, and there is a huge amount more we could talk about, but the key things I want you to take away from this blog (apart from the confusion in shared names for very different resources in each cloud, like roles and policies) are:</p><ul><li><strong>Hierarchy and Inheritance:</strong> GCP’s hierarchical resource model with inheritance for IAM permissions is very different to how AWS does it. The IAM policy, that resource that manages these bindings and the inheritance, is really key for IAM. AWS has organisations and org units, but the primary IAM management is often at the individual account level.</li><li><strong>Role-Based vs. Policy-Based Focus:</strong> While both are ultimately “policy-based,” GCP’s strong emphasis on <strong>roles</strong> as the primary mechanism for granting permissions is more pronounced. You grant roles, not direct permissions, in GCP. AWS gives you more flexibility to define permissions directly in policies and attach them to various entities.</li></ul><p>When I first started using GCP, anyone I chatted to heard about how confusing I found the model. Especially because it felt so different click-ops’ing in the UI vs handling in infrastructure as code. However, after spending more time working with it and realising the power of the GCP hierarchy, I think I’m a convert.</p><p>At the end of the day, the important thing is that you are using IAM in your cloud environment effectively. Make sure you are trying to lock down your important assets (like customer data), to those people and applications that actually need them. Understanding the components, like I’ve tried to help with today, can allow you to do that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1235fbe41ec9" width="1" height="1" alt=""><hr><p><a href="https://engineering.ferocia.com.au/an-iam-identity-crisis-comparing-aws-and-gcp-cloud-iam-1235fbe41ec9">An IAM Identity Crisis — Comparing AWS and GCP Cloud IAM</a> was originally published in <a href="https://engineering.ferocia.com.au/">Ferocia Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>