AWS S3 Bucket

Configure AWS S3 Bucket

Overview

The AWS S3 bucket is used to configure logos and global configuration files in the Citizen Complaints Resolution System.

Steps

1

Configure AWS S3 Bucket

The UI assets, like logos and global config files, are hosted in an S3 bucket.

  • Create a new S3 bucket

  • Add this Bucket Policy to make the contents public:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::works-dev-asset/*"
        }
    ]
}
  • Add the below CORS configuration:

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "PUT",
            "POST",
            "DELETE"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [
            "x-amz-server-side-encryption",
            "x-amz-request-id",
            "x-amz-id-2"
        ],
        "MaxAgeSeconds": 3000
    }
]
2

To access assets from the S3 bucket in your deployment environment:

  • Update environment.yaml file

 configmaps:
    egov-config:
      data:
        s3-assets-bucket: "(pg-egov-assets|egov-playground-assets|egov-uat-assets)"
  • Possible values: pg-egov-assets, egov-playground-assets, egov-uat-assets, etc.

  • Restart the s3-proxy build after making these changes.

Last updated

Was this helpful?