The Amazon SDK for JavaScript V3 API
Reference Guide
Set credentials in a web browser
There are several ways to supply your credentials to the SDK from browser scripts. Some of these are more secure and others afford greater convenience while developing a script.
Here are the ways you can supply your credentials, in order of recommendation:
-
Using Amazon Cognito Identity to authenticate users and supply credentials
-
Using web federated identity
Warning
We do not recommend hard coding your Amazon credentials in your scripts. Hard coding credentials poses a risk of exposing your access key ID and secret access key.