SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for AWS Amazon Web Services, Redshift, AWS Lambda Functions, S3 Buckets, VPC, EC2, IAM

Configure IAM Credentials on Cloud9 instead of AWS Managed Temporary Credentials

In this Cloud9 tutorial, I want to show AWS Cloud9 IDE using developers how they can use their own IAM user' credentials for the AWS CLI operations they will perform on the AWS Cloud9 cloud development environment. To interact with other AWS services and cloud resources on AWS platform, generally Cloud9 developers use IAM credentials beside AWS managed temporary credentials which is the default setting on Cloud9 environment. It my be difficult for Cloud9 new starters to apply their own IAM user's credentials on this cloud IDE tool.

Assume that you have an IAM user with access keys created and you want to use the access key for that IAM user on your Cloud9 cloud IDE for the operations you want to to with AWS CLI commands. Then the first thing you will do is generally opening a new terminal window on Cloud9 and executing "aws configure" command to create a default profile on the Cloud9 environment.

aws configure

AWS configure command will request Access Key Id and Secret Access Key from the user as well as a default region and an output format.
Please note that the access key details shared here are not valid anymore. Please do not share your IAM users' credentials with others because of security reasons.

cannot update AWS managed temporary credentials

After you provide your IAM user credentials, you will probably get the above message informing that credentials could not be updated and asking you to apply Force update. You can force update the Cloud9 environment to use your IAM user credentials.

You can check again AWS credentials settings with "aws configure" command to see if changes are in practice.

aws configure to update credentials for AWS CLI

You can see that the AWS Access Key Id and AWS Secret Access Key are still keep the original values instead of what I typed with first "aws configure" command.
So the credentials I provided are not used so I won't be able to access for example to my target AWS account for listing my Amazon S3 buckets, etc.

The solution is to change the default settings in Preferences for AWS credential settings.
Click on the Cloud9 > Preferences menu options on top navigation bar on your Cloud9 IDE.

AWS Cloud9 Preferences

Click on AWS Settings from left menu within Preferences window.
Disable AWS managed temporary credentials

Amazon Cloud9 AWS settings for credentials

If you again run the AWS CLI command "aws configure" and provide your own IAM user's Access Key Id and Secret Access Key you will see that it is now accepted and you will be using this AWS credential to access to other AWS services and resources via AWS CLI commands on your terminal screen.


Copyright © 2004 - 2024 Eralper YILMAZ. All rights reserved.