Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

aem:upload error 403 in AEM cloud.

Avatar

Level 2

Hello.

 

We are in aem in the cloud.

We are trying to upload assets with aio-cli.

We have created an uploaduser user in AEM, we have included him in the dam-users group, we have also tried to give jcr:all permissions on the content/dam folder.

We are running this command:
aio-aem aem:upload -h https://author-p123810-e1162215.adobeaemcloud.com/ -c uploaduser:uploaduser -t /content/dam/test/images /workspaces/aemcs-environment/uploadfiles/images/*.jpg

 

2024-03-06T15:34:02.576Z [] info: Creating AEM directory /content/dam/test with title ''
2024-03-06-06T15:34:02.601Z [] info: Log file is saved to log file 'upload-1709739242524.log'
2024-03-06-06T15:34:02.665Z [] error: unhandled exception attempting to upload files Request failed with status code 403

We are getting a 403 forbidden error.

 

In local aem-sdk it works correctly.

aio-aem aem:upload -h http://localhost:4502/ -c uploaduser:uploaduser -t /content/dam/test/images /workspaces/aemcs-environment/uploadfiles/images/*.jpg

 

Do you know what could be happening?

 

Thanks.

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @JoseManuel121 To upload assets in AEM as a Cloud Service, you can use the Asset Compute Service (ACS) or the Asset Link Externalizer (ALE) to upload assets to AEM. Here's an example of how you can use ALE to upload assets:

  1. Once the SDK is installed, you can use the Asset Link Externalizer (ALE) to upload assets. Here's an example of how you can use ALE to upload assets:

  2. aio-aem aem:upload -h https://author-p123810-e1162215.adobeaemcloud.com/ -c uploaduser:uploaduser -t /content/dam/test/images /workspaces/aemcs-environment/uploadfiles/images/*.jpg
  3. You need to replace the uploaduser and uploaduser:uploaduser with your actual IMS user and its corresponding IMS token. You can obtain the IMS token by following the instructions in the Adobe I/O Developer Console documentation.

  4. After replacing the credentials, the command should look like this: aio-aem aem:upload -h https://author-p123810-e1162215.adobeaemcloud.com/ -c your-ims-user:your-ims-token -t /content/dam/test/images /workspaces/aemcs-environment/uploadfiles/images/*.jpg

    1. Finally, run the updated command to upload the assets.

    Please note that the AEM as a Cloud Service SDK does not support the aio-aem aem:upload command. You will need to use the ALE command instead.

If you still encounter issues, please provide more details about your setup, such as the AEM as a Cloud Service project configuration and the IMS user configuration.

View solution in original post

5 Replies

Avatar

Community Advisor

can you compare access permissions in your local vs cs author for dam-users group.

403 is related with permission only .

uploaduser is created as a Service User or regular user?

It is better to create as a Service User in AEM as a Cloud Service.

or you can try by giving full access permission manually.

Avatar

Level 2

Hi. Thanks

Are the same permissions on the dam-users group on local as on the cloud server, also we have given the user UploadUser permissions on content/dam jcr:all

Uploaduser is created as regular user, it cannot be service user because this type of user does not have a password.

Try UploadUser permissions / jcr:all, I think the problem is more with the Uploaduser login in the cloud, than with his permissions.

Best regard.

Avatar

Administrator

@JoseManuel121 Did you find the suggestion helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni

Avatar

Level 2

@kautuk_sahni , 

We cannot mark the answer as correct, we continue with the problem.

Avatar

Correct answer by
Level 4

Hi @JoseManuel121 To upload assets in AEM as a Cloud Service, you can use the Asset Compute Service (ACS) or the Asset Link Externalizer (ALE) to upload assets to AEM. Here's an example of how you can use ALE to upload assets:

  1. Once the SDK is installed, you can use the Asset Link Externalizer (ALE) to upload assets. Here's an example of how you can use ALE to upload assets:

  2. aio-aem aem:upload -h https://author-p123810-e1162215.adobeaemcloud.com/ -c uploaduser:uploaduser -t /content/dam/test/images /workspaces/aemcs-environment/uploadfiles/images/*.jpg
  3. You need to replace the uploaduser and uploaduser:uploaduser with your actual IMS user and its corresponding IMS token. You can obtain the IMS token by following the instructions in the Adobe I/O Developer Console documentation.

  4. After replacing the credentials, the command should look like this: aio-aem aem:upload -h https://author-p123810-e1162215.adobeaemcloud.com/ -c your-ims-user:your-ims-token -t /content/dam/test/images /workspaces/aemcs-environment/uploadfiles/images/*.jpg

    1. Finally, run the updated command to upload the assets.

    Please note that the AEM as a Cloud Service SDK does not support the aio-aem aem:upload command. You will need to use the ALE command instead.

If you still encounter issues, please provide more details about your setup, such as the AEM as a Cloud Service project configuration and the IMS user configuration.