How to leverage PEGA Repository API — Amazon S3 for file storage

Sandeep Pamidamarri
4 min readDec 16, 2022

--

In this particular post, let’s try to understand the PEGA Repository Connect API for file and content storage. For any PEGA App, we can store the case/pulse attachments in a CMIS, Web Storage, Repository, and Pega platform database. Mostly, every organization will be using either CMIS / Web storage [Sharepoint/SharePoint Online] options as a content management system. If the application has a requirement that the user uploads or access large files/ streaming files then the Repository approach provides the best option.

These repositories provide an API to access these attachments outside the PEGA Application in the organization’s landscape of applications. Multipart upload is supported. In addition, the Repository will not have the risk of running out of memory. PEGA App provides Amazon S3, Azure Storage Bucket, JFrog, and Pega Cloud File Repository for cloud customers as OOTB options. In this example, let’s try to leverage Amazon S3 Bucket as a repo to store PEGA App attachments.

Step 1: Set up AWS S3 Bucket

Login/SignUp to the AWS console. Navigate to S3 Resource to create the bucket.

Provide the bucket name and keep all other settings as is.

Click on “Create Bucket” at the bottom. Once it is created, you can see it below.

Step 2: Set up I AM user to access AWS S3 Bucket

Navigate to the IAM user service and click “Add users”.

Provide the user name and select — Access Key — Programmatic access option

In the next tab — select “Attach existing policies” and “AmazonS3FullAccess” policy.

Perform the Next to Last step and see the Access Key ID and the Secret access key.

Step 3: Create a PEGA Authentication profile to access the Repo

Navigate to Records -> Security -> Authentication Profile. Click on create and select the Type = ”Amazon Web Services”.

Provide the IAM user Access Key ID and Secret access key. Then perform Save.

Step 4: Create the Amazon S3 pointed PEGA Repository Instance

Navigate to Records -> SysAdmin -> Repository. Click on create and provide the name.

Select the Repository type as “Amazon S3” and provide the Bucket Name that we created in Step 1. In this scenario, it is “pegaapptesting”, select the authentication profile created in Step 3.

Click on “Validate repository” and verify the status of all the operations.

Step 5: Update the Application instance to store the document in the AWS Repo

Note: Basic PEGA Application and respective case creation are out of the scope of this article.

Update your application instance rule and update the content storage and content sourcing as below to refer to the repository.

Test the changes now

Create a case and add a couple of attachments to the case.

Verify these attachments in the Amazon S3 Bucket.

Navigate to Amazon S3 Bucket.

Hurrayyyyy, Congratulations :) Now you successfully understood to leverage the Amazon S3 Repository as a file and content storage system for the PEGA Application. Happy Learning :)

--

--

Sandeep Pamidamarri
Sandeep Pamidamarri

Written by Sandeep Pamidamarri

Digital Transformation Leader | Pega Lead Solution Architect | Pega Certified Data Scientist | Pega Customer Service | Pega Sales Automation | AWS Cloud

No responses yet