Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best practice for third-party scripts wanting AWS config/credential data #1095

Closed
Calrion opened this issue Jan 14, 2015 · 1 comment
Closed
Labels
guidance Question that needs advice or information.

Comments

@Calrion
Copy link

Calrion commented Jan 14, 2015

With reference to #847 and #1037, what's the current recommended best practice for third-party scripts trying to integrate with AWS and/or the AWS CLI tools?

I have a number of scripts that interface with AWS, including post-build scripts that upload releases to S3, a script to send an APNS message via SNS, and a script to make command-line MFA credentials easier to use.

In the past, I've looked for an AWS_CONFIG_FILE environment variable and used that, falling back to ~/.aws/config if it's not defined. But the current tools seem to refuse to read credentials from this file, even if they're present. Additionally, my current script (the MFA one) needs to write credentials for future use.

How should I determine where to read and write credentials from—are there any tools to support this?

@jamesls
Copy link
Member

jamesls commented Jan 14, 2015

The ~/.aws/config and the AWS_CONFIG_FILE are an AWS CLI only configuration mechanism. If you're only working with the AWS CLI, then you can still use these values. However if you're using other AWS SDKs, then you can just use the ~/.aws/credentials file. This is a fixed location that's used by all the AWS SDKs, and is the recommended file to use for interop.

For writing configuration/credential values via a script, you do have the option of using the aws configure set command, which will automatically create/update the configuration file and the shared credentials file based on what config values you're setting.

Let us know if you have any other questions.

@jamesls jamesls closed this as completed Jan 14, 2015
@diehlaws diehlaws added guidance Question that needs advice or information. and removed question labels Jan 4, 2019
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
* chore(version): set 0.14.3.dev1 version (aws#1112) (aws#1113)

* Depend on development version of lambda-builders for dev builds (aws#1111)

* Depend on development version of lambda-builders for dev builds

* Adding prod.txt to manifest

* Splitting dev and tool dependencies

* fix(build): Resolve path after .aws-sam is created (aws#1110)

* fix(build): Resolve path after .aws-sam is created

* fix: build (make pr)

* Design and implementation for producing debug build artifacts (aws#1095)

* design: Initial Design for producing debug artifacts

* initial implementation

* Adding unit tests

* Integration test with debug build mode

* Adjust Design doc and add keyword arg to a call

* fix(dotnet): init template fixes (aws#1117)

* chore(version): set 0.15.0 (aws#1125)

* Revert "Depend on development version of lambda-builders for dev builds (aws#1111)" (aws#1128)

This reverts commit 7e9de790e23791ba176faff2030286db4007e503.

* Bumping to Lambda Builders 0.3.0 (aws#1129)

Bumping to Lambda Builders 0.3.0

* fix(func-tests): add dependency manager param (aws#1130)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants