AirLabsTeam / react-native-aws-cognito-js

React Native AWS Cognito JS SDK
Other
134 stars 19 forks source link

Access AWS resources (S3 / DynamoDB) by CognitoIdentityCredentials #14

Open sammeowww opened 7 years ago

sammeowww commented 7 years ago

Thanks for this great tool! It's really helpful!

Now I'm facing another problem, I'm attempting to follow this guide to access S3 resources

https://aws.amazon.com/blogs/developer/react-native-support-in-the-aws-sdk-for-javascript/

import {
  AWS,
  TransferUtility,
  Config,
  CognitoIdentityCredentials
} from "aws-sdk/dist/aws-sdk-react-native";

......

const s3 = new AWS.S3({
  region: 'us-east-1',
  credentials: Config.credentials
});

However it raised error message undefined is not an object (evaluating 'new_awsSdkReactNative.AWS.S3')

Shall I use other method to import AWS resources? Thank you!

jmparsons commented 7 years ago

@samuel-hkust add aws-sdk to your project.