Skip to content

Commit

Permalink
Merge pull request #2 from aws/master
Browse files Browse the repository at this point in the history
merge upstream/master
  • Loading branch information
mlabieniec authored Feb 22, 2018
2 parents ca96d86 + f613726 commit 7bf5565
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/media/authentication_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The AWS Amplify Auth module provides Authentication APIs and building blocks to
* [Extension](#extension)
- [UI Theme](#ui-theme)
- [Error Message](#error-message)
- [AWS Services](#aws-services)

## Installation and Configuration

Expand Down Expand Up @@ -441,3 +442,24 @@ const map = (message) => {
```

You may notice in `AmplifyMessageMap.js` it also handles internationalization. The topic is covered in [I18n Guide](i18n_guide.md)

### AWS Services

You can call methods on any AWS Service by passing in your credentials from auth to the service call constructor:

```js
Auth.currentCredentials()
.then(credentials => {
const route53 = new Route53({
apiVersion: '2013-04-01',
credentials: Auth.essentialCredentials(credentials)
});

// more code working with route53 object
// route53.changeResourceRecordSets();
})
```

Note: your Amazon Cognito users' [IAM role](https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html) must have the appropriate permissions to call the requested services.

Full API Documentation is available <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/_index.html" target="_blank">here</a>.
22 changes: 22 additions & 0 deletions docs/media/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ AWS Amplify is not limited to AWS or React. The library is designed to support d
* [Installation & Configuration](#installation)
* [Analytics](#analytics)
* [Authentication](#authentication)
* [AWS Services](#aws-services)
* [React Native Development](#react-native-development)

You can begin with an existing React application. Otherwise, please use [Create React App](https://github.com/facebookincubator/create-react-app).
Expand Down Expand Up @@ -122,6 +123,27 @@ This will gate the entire application inside an Authentication UI. Only signed i
For more about Authenticator, click [here](authentication_guide.md)
## AWS Services
You can call methods on any AWS Service by passing in your credentials from auth to the service call constructor:
```js
Auth.currentCredentials()
.then(credentials => {
const route53 = new Route53({
apiVersion: '2013-04-01',
credentials: Auth.essentialCredentials(credentials)
});

// more code working with route53 object
// route53.changeResourceRecordSets();
})
```
Note: your Amazon Cognito users' [IAM role](https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html) must have the appropriate permissions to call the requested services.
Full API Documentation is available <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/_index.html" target="_blank">here</a>.
## React Native Development
AWS Amplify is available as an npm package and supports both web and React Native core APIs. Run the following from the current directory of your application:
Expand Down

0 comments on commit 7bf5565

Please sign in to comment.