This AWS solution automates the generation of Seekable OCI (SOCI) index artifacts and stores them in Amazon ECR. It provides an easy way for customers to try SOCI technology to lazily load container images.
The AWS SOCI Index Builder solution consists of the following components:
- EventBridge Rule: Triggers when an image is pushed to ECR
- ECR Image Action Event Filtering Lambda: Filters ECR image push events based on repository and tag patterns
- SOCI Index Generator Lambda: Generates SOCI index artifacts for the image and pushes them back to ECR
The solution supports two versions of SOCI index:
- V1: The original SOCI index format based on the OCI referrers API
- V2: An improved format that attaches the SOCI index to an image directly
Comma-separated list of SOCI repository image tag filters. Each filter is a repository name followed by a colon, ":" and followed by a tag. Both repository names and tags may contain wildcards denoted by an asterisk, "*".
Examples:
prod*:latest
: Matches all images tagged with "latest" that are pushed to any repositories that start with "prod"dev:*
: Matches all images pushed to the "dev" repository*:*
: Matches all images pushed to all repositories in your private registry
The version of SOCI index to generate:
V1
: Original SOCI Index formatV2
: Latest SOCI Index format (Recommended)
The solution uses taskcat for testing CloudFormation deployments across multiple regions. The .taskcat.yml
file configurable options:
- Regions: List of AWS regions where you want to deploy the stack
- SociRepositoryImageTagFilters: Filter pattern for ECR repositories and image tags
Example configuration:
regions:
- us-east-1
- us-west-2
- eu-west-1
parameters:
SociRepositoryImageTagFilters: "*:*"
- When an image is pushed to ECR, an EventBridge rule triggers the ECR Image Action Event Filtering Lambda
- The Lambda checks if the image matches the configured filters
- If there's a match, it invokes the SOCI Index Generator Lambda
- The SOCI Index Generator Lambda:
- Pulls the image from ECR
- Generates SOCI index artifacts using the specified version (V1 or V2)
- Pushes the SOCI index artifacts back to ECR