6. BayunS3
BayunS3 is a sample application that uses overridden methods from S3Wrapper SDK for secure storage onto AWS S3. The app itself works exactly similar to the case of an app using the original AWS S3 SDK directly. However, the wrapper SDK automatically encrypts a file before uploading it to the S3 bucket and decrypts it after downloading it, without the application having to deal with encryption keys, etc.
AWS Credentials
To use Amazon Cognito user pools, you need an AWS account. You can create a user pool through the Amazon Cognito console. You can follow the AWS developer guide to create user pool.
Replace the values of UserPoold, Region and ClientId their respective values in the config.js
file.
You are provided with an App Id and Application Secret when your app is registered with Bayun, see Registering a new App. In the config.js
file, replace value of BayunAppId, BayunAppSalt, BayunAppSecret, EnableFaceRecognition, and BaseUrl.
Register and Login
You need to first signUp using Amazon Cognito User Pools . Enter your username, password, email and set your company name. Hit Register button, You will be redirected to verification page and you will receive a confirmation code on your email address. Enter the email address and confirmation code in the verification screen and complete your signup process.
After signup you can signIn to your account. Provide your username and password to signIn. You should be able to upload/download files to/from the bucket.
In the BayunS3 sample app, you have to explicitly mention your bucket name, for this the bucket has to be created(with NO-CORS policy) on AWS console in advance. You can provide your own bucket name for upload/download operations.
Where to Go From Here?
You can find the BayunS3 app on Github.
For detailed step-by-step instructions on how to build and run the JavaScript application, see the README file.
Last updated