Question

how to place a file to S3 bucket

Hi,

We have requirement to place the file into S3 bucket .

I have seen a java code in AWS S3 website, is it the only way to upload file into S3 from pega ? or do we have any other option ?

Kindly help us in achieving this.

Thanks

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

Pega
October 10, 2018 - 8:52am

Hi,

Can you let us know what kind of versions of PRPC you are using? Also, this is an environment hosted by Pega, or this is on-premise installation?

Thanks,
Lukasz

October 10, 2018 - 12:24pm
Response to guzil

Hi,

Thanks for the response.

We are trying to implement in 7.4(POC environment) but our actual project environment would be 7.3.1.

Environment is not on premise. It is cloud environment which is provided by our organisation for POC's.

Thanks

 

Pega
October 12, 2018 - 9:43am

Hi,

One more additional question. Namely, can you let us know about the purpose of using the S3?

Do you need to store case attachments to Pega Cloud File Storage? Or you are looking for the access to S3 in order to put there some files. And in the PRPC application work on this files?

Thanks,
Lukasz

October 13, 2018 - 9:59am
Response to guzil

Hi,

We need to download the data from pega and access S3 bucket to place files in the location.

Thanks

Pega
October 15, 2018 - 8:16am
Response to ParthibanU

 

Hi,

So on the same beginning pls configure your environment in the following way:

Install the HFix-39385 JVM Crash/OOM on large attachment uploads. I attached the DL item which contains this HF. And follow below instruction:

  1. Customer receives DL containing the hotfix
  2. Customer installs hotfix via Designer Studio
  3. Create settings to direct attachments to the newly configured storage. These can be created as Data-Admin-System-Settings by the customer:
    • Customer creates the following Data-Admin-System-Settings:
Setting Purpose

Value

Owning Ruleset

storage/content/repository/name

pegacloudfilestorage

Pega-Engine

storage/content/repository/folder

attachments

Pega-Engine

 

To start the upload process, simply move the attached file into the target directory /local/pega-work/sync-data/* (this is the default directory available on all Pega instances). And from this local dir, the whole catalog structure along with the files will be synced automatically with the S3 bucket. The attachments stored in S3 will be protected and secured through ACL(access control list) on the bucket and any unauthorized user can't access it. So we can assume that the S3 bucket in this configuration is acting as a repository of the attachments. And in case of the multi-node configuration, or in when the node termination appears, they files will be always automatically synced across the cluster. The best practice is to work on the files which are stored on the local system. And if you are interested about the example of Java activity, please take a look at the MoveFileToListeners.java

And there is also a solution like below:

Introduction
Customers need the ability to upload and download files between their local systems and their Cloud 2.x environments. An SFTP server provides a standard method for these file transfers. The SFTP server and the Pega node tier machines connect to a shared file space backed by the S3 data bucket.

 

SFTP server

 

The SFTP server is a standard Amazon Linux EC2 inside of an AutoScaling Group behind an Elastic Load Balancer. The sshd service is modified so that a single user, sftp-user, can SFTP into the server. The user is limited to SFTP-only usage, i.e. the user cannot SSH into the system. Upon provisioning, a public SSH key is supplied for the user via SftpUserPublicKey. The private key must be present where the SFTP session originates.

S3 data bucket

 

The S3 data bucket contains a location that is shared between the SFTP server, and Pega node tier machines. It is s3://<bucketname>/USERID/PACID/environment/transfer. This location is mounted on the SFTP server as /home/sftp-user/pegafiletransfer. On Pega node tier machines, it is mounted as /local/pega-work/sync-data.

 

Thanks,
Lukasz

October 16, 2018 - 5:14am
Response to guzil

Hi Guzil,

Thanks much for the response. We will try this and let you know for any queries.

Thanks

Parthiban