react-aws-dashboard
A React component which provides tabs to easily switch between AWS environments. This is completely client side and requires no backend to function.
This componenet requires a single property, a list of environments. Each environment has a name attribute and a configFunction, which is a function that returns an AWS.Config object.
Installation
yarn add react-aws-dashboard
Example (with create-react-app)
- Create new react app and add react-aws-dashboard
yarn create react-app my-app --template typescriptcd my-appyarn add react-aws-dashboard aws-sdk
- Replace src/App.tsx with the following code importing the react-aws-dashboard component.
;;;
Screenshot
Complex Example (Using AWS Cognito User Pools and Federation)
To run this demo you need to do the following...
- Create a Cognito User Pool with a domain and an application client.
- Cognito Identity Pool, with Federation set up with the Cognito User Pool.
- Supply the following variables: AWS_REGION, USER_POOL_ID, USER_POOL_WEB_CLIENT_ID, USER_POOL_DOMAIN, IDENTITY_POOL_ID_1, IDENTITY_POOL_ID_2 and MY_PROVIDER.
Note: If you only want one identity pool then you can delete the second configFunction mySecondFederatedIdentity
;;;;; Auth.configure; ; ; ; ; ;