Error: S3 Provider, on saving, 'Validation failed' Field Region required

Hi,

I am getting an error when I create an S3 API. On saving a validation error appears saying that Region Field is required. But I have selected the region. I am running Wappler 4.9.1

Anyone had a similar problem.
Any assistance? @Teodor @George?

This bug report is related to:

@Sorry_Duh thank you! But what is the solution?
I have dynamic values picking up from Global set values for AccessKey and SecretKey and I don’t see code for manually entering Region? I am using AWS

A bit frusting I can image for all and a little surprised that the very first initial step of setting up an S3 storage provider is buggy - it renders all other related functions useless.

First time setting up and getting start with S3 AWS.

Unfortunately I don’t think there is a solution yet but maybe wrong my s3 was setup before this bug occurred so haven’t experienced this myself. I just linked the bug reports so you knew it wasn’t just you having the issue :slight_smile:

@Sorry_Duh, are you using AWS? can you share the actual code so I can try it manually?

I use Digital Ocean personally and It looks like a few tried hardcoding it and then face other issues with modules not been added etc

You can add these details in the code editor. But the details are not saved permanently in the project as these get deleted when the project is re-opened or s3 API is accessed again. So, these details will need to be re-entered if deleted.

{
  "name": "aws_s3",
  "module": "s3",
  "action": "provider",
  "options": {
    "endpoint": "AWS_REGION_NAME",
    "accessKeyId": "AWS_S3_ACCESS_KEY",
    "secretAccessKey": "AWS_S3_SECRET_ACCESS_KEY"
  }
}

You may also need to check the package.json file whether these two dependencies have been correctly added.

"@aws-sdk/client-s3": "^3.41.0",
"@aws-sdk/s3-request-presigner": "^3.41.0",

Thanks @guptast. I have updated the file manually and will see how I go continuing with the tutorial setup of my first bucket.
By the way, where do I find package.json to check dependencies?

UPDATE @guptast still doesn’t work. In the Wappler interface the values are still blank and it won’t let me continue with adding any more steps.

To see package.json you want to be on the site manager tab (where your pages are) and then top right of the sidebar is pages assets and files. Select files ad you should see it pop up there

Not sure where it is

After you expand the very first folder it should show up at the bottom:

At least for docker its placement might be different depending on the set up

I have no package.json.
Not sure if this matters, but I am using PHP
@Sorry_Duh not sure why I can’t see it or don’t have it?
@guptast do you have problems with the wappler interface not displaying the values after manually updating the S3 file?

Yes, the interface doesn’t display the values after manually updating the s3 file. In fact, it also deletes any code that has been manually entered. So, the workaround at this stage is to manually enter the s3 details in the code editor and to not access s3 API in the wappler interface. The details may also get deleted if you close and reopen the project.

I am using AWS s3 setup in NodeJS projects. I’m not aware of the location where files/packages related to any installed modules are saved in a PHP project.

Thanks @guptast. No luck with the manual. It look like the Region is not correct. Do we remove space from region name??
sia pacific (sydney)

I’m also using the Asia Pacific (Sydney region). The endpoint for Sydney is: s3.ap-southeast-2.amazonaws.com

ap-southeast-2 in the endpoint value corresponds to the Sydney Region. This is the name listed next to each bucket under the AWS Region column.

Thanks so much @guptast I’ve made my first connection. However, you are right about the code in the provider being overwritten every time. It’s quite annoying.
Thanks very much for your help.

1 Like

Glad to know that it’s working for you.

Hopefully the bug will be fixed soon, but in the meantime you could make the file read-only; not ideal, but better than having the file overwritten.

Thanks @TomD. Good idea.