avi
avi

Reputation: 117

How to get Access Key and Secrete Access Key If I know aws username and password by programmingly

I am developing some windows application which need to communicate with Amazon AWS S3 to get the data and store the data. Now the end client doesn't know about the Access key and secret access key which knows about the username and password so I have to get username and password and then communicate the aws s3 but to communicate with s3 we need the access key and secret access key so How can I able to get Access Key and Secret Access Key from the username and password using programming?

Upvotes: 0

Views: 2653

Answers (1)

Sergey Kovalev
Sergey Kovalev

Reputation: 9401

First of all, using username and password is considered a bad security practice. The end user should obtain IAM access key and provide it to the software. Please, review "Best Practices for Managing AWS Access Keys" guide from AWS https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

Second, there is no way to retrieve existing key after it has been created. You can create IAM access keys programmatically from your application using AWS SDK (example for Node.js: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/iam-examples-managing-access-keys.html), but to set up SDK you will need a key in the first place.

I would re-engineer the application and require API keys instead of username/password.

Upvotes: 2

Related Questions