Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credentials should not be empty. error on Amplify storage function #12945

Closed
FlyingTurkman opened this issue Feb 2, 2024 · 8 comments
Closed
Assignees
Labels
question General question Storage Related to Storage components/category transferred This issue was transferred from another Amplify project

Comments

@FlyingTurkman
Copy link

Which Specific Feature is your question related to?

Amplify

Question

I am newbie for aws. I am trying to learn deploy an app in amplify with Nexj.js 15. I did everything like on docs but when I am trying to uploadData giving an error "Credentials should not be empty."

@FlyingTurkman FlyingTurkman added pending-triage Issue is pending triage question General question labels Feb 2, 2024
@ykethan
Copy link
Member

ykethan commented Feb 2, 2024

@FlyingTurkman are you utilizing the documentation here? Does the application have auth resource configured?

transferring to Amplify JS repository for further assistance.

@ykethan ykethan transferred this issue from aws-amplify/amplify-studio Feb 2, 2024
@ykethan ykethan added the transferred This issue was transferred from another Amplify project label Feb 2, 2024
@FlyingTurkman
Copy link
Author

@FlyingTurkman are you utilizing the documentation here? Does the application have auth resource configured?

transferring to Amplify JS repository for further assistance.

Yes I did but not worked.

@cwomack cwomack self-assigned this Feb 2, 2024
@cwomack cwomack added the Storage Related to Storage components/category label Feb 2, 2024
@nadetastic
Copy link
Member

Hi @FlyingTurkman is this issue happening locally or after you deploy to hosting?

@FlyingTurkman
Copy link
Author

@nadetastic I figure it out. Problem was about security policy.

@nadetastic nadetastic removed the pending-triage Issue is pending triage label Feb 13, 2024
@Mxctr1
Copy link

Mxctr1 commented Feb 21, 2024

Can you tell me more about that @FlyingTurkman ? What about security policy ? I have the same problem

@FlyingTurkman
Copy link
Author

Can you tell me more about that @FlyingTurkman ? What about security policy ? I have the same problem

I edit secure policy on permissions for each service like that for example at s3 storage.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::<IAM_Number>:user/<IAM_Username>"
            },
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::<S3_Storage_Bucket_Name>"
        }
    ]
}

@Mxctr1
Copy link

Mxctr1 commented Feb 21, 2024

Whats the IAM_username ? I have a userool and I want to allow all my user in the userpool to upload their profile picture

@FlyingTurkman
Copy link
Author

Whats the IAM_username ? I have a userool and I want to allow all my user in the userpool to upload their profile picture

https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_access-management.html

You can allow upload files for auth users with security policies.

There is example about your situation. https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General question Storage Related to Storage components/category transferred This issue was transferred from another Amplify project
Projects
None yet
Development

No branches or pull requests

5 participants