
How to prohibit and replace the use of permanent AWS credentials?
The use of permanent credentials is an extremely common practice with AWS. Injecting the values of AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
into environment variables is a simple and reassuring solution for most developers. However, from a security standpoint, this practice is far from ideal. Over time, these sensitive values can leak, and it becomes difficult to control how they are used.
The good news is that there are better alternatives! We’ll start by discussing how to block their creation, and then explain the replacement solutions for the following three areas: developer access, AWS services, and DevOps pipelines.
Restricting Usage
Before even discussing alternatives to permanent credentials, it’s essential to restrict their usage. To do so, the best approach is to use an SCP (Service Control Policy). An SCP is an IAM policy that can be applied to all AWS accounts within an organization.
Although short, this policy is extremely powerful! It blocks the creation of long-term credentials and IAM users. The strength of an SCP lies in the fact that even a root user cannot override it, thus ensuring compliance across all Thirdbridge projects.
Managing Developer Access
The first challenge to address is managing developer access. Typically, an IAM user is created for each developer. That user can then generate permanent credentials to, for example, run a project locally. The recommended alternative for this use case is to use IAM Identity Center along with AWS Organizations.
AWS offers the concept of an Organization. Simply put, an Organization is a collection of separate AWS accounts that can be grouped into Organizational Units (OUs). At Thirdbridge, each client project is represented by an OU. Each OU contains two AWS accounts: one for lower environments (dev, uat, staging, etc.) and one for production.
The strength of IAM Identity Center lies in its ability to create a single profile for each developer and assign the necessary permissions based on their role and current responsibilities.
So, even if a developer works on 10 different projects, they have only one account. When logging into the AWS web console, they do so through a role managed by IAM Identity Center. Finally, if a developer needs an AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
to run a project locally, IAM Identity Center can provide temporary credentials that can be used.
Running an AWS Service
A common mistake is manually injecting AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
into an AWS service. In reality, AWS services all have an IAM role associated with their execution. Whether it’s ECS, Lambda, or EC2, you should always use the role assigned to the service rather than injecting credentials.
Continuous Deployment
Removing permanent credentials from continuous deployment pipelines is often the most intimidating part for developers. Injecting AWS keys via the secrets management systems offered by DevOps platforms like GitLab and GitHub is an extremely common practice.
However, the recommended approach is to use the OIDC protocol to establish a trust relationship between the DevOps platform and AWS. This not only removes the need for permanent credentials, but also enables much more precise permission scoping. For example, you can assign an IAM role to a specific Git branch, thereby respecting the principle of least privilege.
Since setup can sometimes be a barrier to adopting OIDC, we’ve prepared a detailed step-by-step guide for both GitHub and GitLab.
Conclusion
Restricting the use of permanent credentials in AWS is an essential security practice for any organization aiming for a high level of compliance. While limiting their usage with an SCP is relatively easy to implement, setting up their alternatives can sometimes be more complex.
We hope this short guide will be helpful to other organizations looking to elevate their operational practices with AWS. We’ve kept things high-level to keep it light to read, but feel free to reach out to us for any more specific questions 🙂
Other articles




.webp)



Oct 15, 2024
Pierre-Étienne Bousquet guest of "Les Affaires"
Our president and co-founder, Pierre-Étienne Bousquet, discussed with Jean-François Venne from Les Affaires the significant growth of digital technology in the retail industry and its impact on online sales, which are becoming increasingly crucial for revenue.


.png)
Jun 14, 2024
Recruiting an In-House Team or Hiring an Agency for Developing Your Application?
When embarking on a project as significant and important as developing an application, a crucial dilemma quickly arises: choosing between a specialized agency or recruiting your own in-house team to accomplish the work. One thing is certain, both options present distinct advantages and constraints.


May 22, 2024
Optimizing Synergy with Your Software Development Partner
The digital realm, especially that of custom digital solution development, is constantly evolving—between fast technological advancements and changing consumer needs, it's quite challenging to predict what the future holds for web players.
.png)
.webp)
.webp)
Mar 31, 2025
Ratings & Reviews: Their Impact on an App's Success
An app’s success isn’t solely based on meticulous engineering or eye-catching designs. It’s crucial to deliver a product that is high-performing, accessible, useful, and user-friendly, alongside a go-to-market (GTM) strategy tailored to the digital product ecosystem.
.webp)










.png)
May 3, 2024
Simplified Infrastructures for Enhanced Agility
At Thirdbridge, we believe that project-oriented teams deliver superior quality results, and do so more quickly. Given that they are responsible for the entire value creation flow, these teams can increase their velocity by eliminating bottlenecks themselves. Moreover, entrusting end-to-end flow responsibility to our developer teams makes their work even more engaging and motivating.


.webp)
.webp)

Oct 29, 2024
AI driving innovation: A new Era for Mobile Apps and User Experience
Artificial intelligence (AI) represents a digital transformation that impacts us all. This rapidly advancing technology, fueled by data analysis, not only enables informed decision-making and reliable forecasting but also allows for the completion of many tasks at a faster pace.

Oct 15, 2024
Enhancing Product Management: Key to Success in Software Development
The distinction between product management and project management is essential for ensuring optimal productivity. It’s not enough to treat them as interchangeable concepts; it’s crucial to adopt a proactive approach to place the right resources in the right places.

Sep 24, 2024
Cybersecurity and Mobile Applications: Choosing the Right Authentication Method
Mobile applications are essential tools that handle personal data, access sensitive information, and are part of our daily lives. However, in an age where the term cybersecurity is on everyone's lips, ensuring the security of these applications and the information they contain is crucial.
.webp)


.png)
