Partial credentials found in assume-role, missing: source_profile or credential_source
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Check out my series on Automating Cybersecurity Metrics | Code.
🔒 Related Stories: Bugs | AWS Security | Secure Code
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you ever get this error when trying to configure the AWS CLI:
Partial credentials found in assume-role, missing: source_profile or credential_source
you need to add one of the those values to the configuration.
One option is to add a role to your EC2 instance that has permissions you need and then use credential_source. Add this to your AWS CLI profile:
credential_source = Ec2InstanceMetadata
The other option is use aws configure to add developer credentials (AWS secret key and access key) to a profile or your default profile and then reference the profile that as your credentials.
In other words:
- Create and obtain your developer credentials.
- Run aws configure and enter the credentails either for the default profile:
aws configure
- Or you can add the credentials to a specific profile which I have name my_profile below:
aws configure --profile my_profile
- Then update whatever other profile for which you are getting the error with either the default profile:
source_profile=default
Or the named profile you created:
source_profile=my_profile
If using Linux, you can view the configuration using this command:
vi ~/.aws/config
And edit the configuration file directly, but if you make a mistake you might have problems.
Another option to add the values would be using aws set:
Follow for updates.
Teri Radichel | © 2nd Sight Lab 2023
About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4oxP4LXk8l8c3mpRvO7ejg.png)