Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AWSMobileClient auth = AWSMobileClient.getInstance();
- auth.signIn("username", "password", new HashMap<String, String>());
- if (auth.isSignedIn()) {
- ActivityUtils.startActivity(this, MyActivity.class);
- }
- Role ARN arn:aws:iam::<my account number>:role/Cognito_S3_Full_Access
- {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": "s3:*",
- "Resource": "*"
- }
- ]
- }
- AWSMobileClient awsMobileClient =AWSMobileClient.getInstance();
- AmazonS3Client s3Client = new AmazonS3Client(awsMobileClient);
- 2019-05-20 17:56:21.645 27019-27019/com.mycomp.mypackage E/S3Uploader: Error upload file to S3 bucket : Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 375C07384A904483)
- BasicAWSCredentials credentials = new BasicAWSCredentials("myAccessKey_hsjgfhjsdg", "mySecretKey_asdhasjkdha");
- AmazonS3Client s3Client = new AmazonS3Client(credentials);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement