Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Payload cloud storage access denied error 403

default discord avatar
possums4ever123last year
18

Hello i am trying to add cloud storage to my payload ecommerce project but after i put all of the environment variables including payload secret and password among others in my .env file i am still getting a access denied 403 error please help let me know if you require more information or screen shots



[16:08:50] ERROR (payload): Error getting file from cloud storage


err: {


"type": "S3ServiceException",


"message": "Access Denied",


"stack":


AccessDenied: Access Denied


at throwDefaultError (/Users/sethdimmer/Desktop/ecommerceeee/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:8:22)


at /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:18:39


at de_GetObjectCommandError (/Users/sethdimmer/Desktop/ecommerceeee/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js:4412:20)


at processTicksAndRejections (node:internal/process/task_queues:95:5)


at async /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24


at async /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js:30:20


at async /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js:31:46


at async /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/flexibleChecksumsMiddleware.js:63:20


at async /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/region-redirect-endpoint-middleware.js:14:24


at async /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/region-redirect-middleware.js:9:20


at async /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:7:26


at async /Users/sethdimmer/Desktop/ecommerceeee/node_modules/@payloadcms/plugin-cloud/src/staticHandler.ts:41:22


"name": "AccessDenied",


"$fault": "client",


"$metadata": {


"httpStatusCode": 403,


"requestId": "67YMQ8BZDFMCF0CR",


"extendedRequestId": "azCYn/8gDWMUo2jHNdpX5vZ/MWO/XaKxjrm2xS48PY3uptMb2VtB/PhoCj3JUlMb10tyZ2TRpaQ=",


"attempts": 1,


"totalRetryDelay": 0


},


"Code": "AccessDenied",


"RequestId": "67YMQ8BZDFMCF0CR",


"HostId": "azCYn/8gDWMUo2jHNdpX5vZ/MWO/XaKxjrm2xS48PY3uptMb2VtB/PhoCj3JUlMb10tyZ2TRpaQ="


}



thats the error in the terminal



@1064347748993863850

hey i am at the end of the javascript mastery e-commerce store that i saw you posted in the

#1146821621873643612

and i am having trouble with payload cloud storage like when i am trying to deploy the project



i checked all of my environment variables and made sure they were all correct but i am still getting an access denied error

  • discord user avatar
    seanzubrickas
    last year

    Hey

    @880895096617332736

    Nate is our humble marketing guy, but I can try to chime in here.

  • default discord avatar
    possums4ever123last year

    Oh my bad

  • discord user avatar
    seanzubrickas
    last year

    no worries!

  • default discord avatar
    possums4ever123last year

    yes i got a message from elliot when i emailed on the payload website



    i can give you the project id

  • default discord avatar
    possums4ever123last year

    yes i did



    the project id is 65abdccd9cd1b4cda483ee66



    @364562745447940099

    do i need to upload my files to github the last commit i did was just setting up the ecommerce payload cms



    im just asking to make sure i dont mess anything up

  • discord user avatar
    seanzubrickas
    last year

    so you have not pushed your changes since adding in the cloud storage plugin?

  • default discord avatar
    possums4ever123last year

    yeah i have a 150 commits i have not commited



    ill push my changes



    i pushed my changes



    im still getting the same error unfortunately in my terminal when i npm run dev



    @364562745447940099

    let me know what other information you need me to provide



    Hey

    @967118574445547650

    i got your email and sean was helping me but he probably had to go do something im just having trouble with cloud storage and i already pushed my changes to github i just need to deploy this project then im done



    im just a little confused on what adapter i should use as well

  • discord user avatar
    denolfe
    last year

    Let me clarify a bit, to fully utilize Payload Cloud's storage, your project should be using

    @payloadcms/plugin-cloud

    (not to be confused with @payloadcms/plugin-cloud-storage. This is for using cloud storage outside of Payload Cloud)

    .



    When the

    payloadCloud()

    function is passed inside your

    payload.config.ts

    , it will automatically configure any project that performs uploads to use Payload Cloud's storage. However, this is only configured when deployed within Payload Cloud. It will not function locally, your project will revert to local disk storage during development.

  • default discord avatar
    possums4ever123last year

    ok i checked my package.json file as well as my payload.config.ts file and i am using@payloadcms/plugin-cloud



    how do u deploy within payload cloud? or am i already doing that since i uploaded my latest commit to payload

  • discord user avatar
    ncaminata
    last year

    a marketing guy that is humble. lol.

  • discord user avatar
    denolfe
    last year

    Pushing to the repository on the main branch will automatically deploy the latest commit.



    You can see the last deployed commit from the project dashboard

  • default discord avatar
    possums4ever123last year

    Ok I got that but I’m using the correct payload plugin so I don’t know why it’s not working still I checked my environment variables and everything is good on that end



    I’m sorry I know this is a pain

  • discord user avatar
    denolfe
    last year

    Okay, so you're opening your deployed project's

    /admin

    page, then performing an upload and seeing that error in the logs?



    Is there any indication of failure in the admin UI or web console?

  • default discord avatar
    possums4ever123last year

    My mac is updating I’ll let you know what I find out in 5 minutes thank you for the help give me a sec



    @967118574445547650

    there is no indication of failure in console when I go to /admin



    What do you mean by perform upload?



    I’m only seeing the same error of error getting file from cloud storage access denied



    In my terminal of my project

  • discord user avatar
    denolfe
    last year

    I mean try adding a new image in an upload collection. Is that what you're doing to get the error?

  • default discord avatar
    possums4ever123last year

    Ok one sec I just deleted my media file so I’ll upload a couple of images that I had before



    Sorry hold on I’m having some technical difficulties I’ll get back to you on that as soon as I can



    Hey I am having technical difficulties with my computer so I’m taking it to a shop I will have an update on where I am at with the problem in a couple of days and I might need help if what you suggested I try doesn’t work



    Just letting you know thanks for the help so far



    Hello

    @967118574445547650

    i am no longer getting the access denied error for the cloud storage but i am having trouble deploying my project





    nevermind i just turned off prettier and redeployed

  • discord user avatar
    seanzubrickas
    last year

    Glad you got that figured out! Closing this out.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.