Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/awslabs/cfn-ecr-aws-soci-index-builder
/ functions
Functions
36 in github.com/awslabs/cfn-ecr-aws-soci-index-builder
⨍
Functions
36
◇
Types & classes
5
↓ 18 callers
Function
log_and_generate_response
(status_code, message)
functions/source/ecr-image-action-event-filtering/ecr_image_action_event_filtering_lambda_function.py:116
↓ 7 callers
Function
lambdaError
Log and return the lambda handler error
functions/source/soci-index-generator-lambda/handler.go:375
↓ 3 callers
Function
addContext
Add more context to the log event
functions/source/soci-index-generator-lambda/utils/log/log.go:34
↓ 2 callers
Method
GetManifest
Call registry's getManifest and return the image's manifest The image reference must be a digest because that's what oras-go FetchReference takes
functions/source/soci-index-generator-lambda/utils/registry/registry.go:136
↓ 2 callers
Function
HandleRequest
(ctx context.Context, event events.ECRImageActionEvent)
functions/source/soci-index-generator-lambda/handler.go:64
↓ 2 callers
Method
HeadManifest
Call registry's headManifest and return the manifest's descriptor
functions/source/soci-index-generator-lambda/utils/registry/registry.go:120
↓ 2 callers
Function
Init
Initialize a remote registry
functions/source/soci-index-generator-lambda/utils/registry/registry.go:53
↓ 2 callers
Function
cleanUp
Clean up the data written by the Lambda
functions/source/soci-index-generator-lambda/handler.go:256
↓ 2 callers
Function
log_to_cloudwatch
(message)
functions/source/ecr-image-action-event-filtering/ecr_image_action_event_filtering_lambda_function.py:124
↓ 2 callers
Method
validateImageManifest
(ctx context.Context, repositoryName string, digest string)
functions/source/soci-index-generator-lambda/utils/registry/registry.go:161
↓ 1 callers
Function
CalculateFreeSpace
Calculate free splace in bytes of a directory
functions/source/soci-index-generator-lambda/utils/fs/fs.go:10
↓ 1 callers
Method
Pull
Pull an image from the remote registry to a local OCI Store imageReference can be either a digest or a tag
functions/source/soci-index-generator-lambda/utils/registry/registry.go:70
↓ 1 callers
Method
Push
Push a OCI artifact to remote registry descriptor: ocispec Descriptor of the artifact ociStore: the local OCI store tag: optional tag to apply to the
functions/source/soci-index-generator-lambda/utils/registry/registry.go:89
↓ 1 callers
Method
ValidateImageDigest
ValidateImageDigest validates if a digest is valid based on SOCI index version requirements For SOCI V1, only image manifests are supported For SOCI V
functions/source/soci-index-generator-lambda/utils/registry/registry.go:199
↓ 1 callers
Function
authorizeEcr
Authorize ECR registry
functions/source/soci-index-generator-lambda/utils/registry/registry.go:234
↓ 1 callers
Function
buildEcrRegistryUrl
Returns ecr registry url from an image action event
functions/source/soci-index-generator-lambda/handler.go:230
↓ 1 callers
Function
buildIndex
Build soci index for an image and returns its ocispec.Descriptor
functions/source/soci-index-generator-lambda/handler.go:315
↓ 1 callers
Function
createTempDir
Create a temp directory in /tmp The directory is prefixed by the Lambda's request id
functions/source/soci-index-generator-lambda/handler.go:240
↓ 1 callers
Function
initContainerdStore
Init containerd store
functions/source/soci-index-generator-lambda/handler.go:288
↓ 1 callers
Function
initSociArtifactsDb
Init a new instance of SOCI artifacts DB
functions/source/soci-index-generator-lambda/handler.go:305
↓ 1 callers
Function
initSociStore
Init SOCI artifact store
functions/source/soci-index-generator-lambda/handler.go:294
↓ 1 callers
Function
isEcrRegistry
Check if a registry is an ECR registry
functions/source/soci-index-generator-lambda/utils/registry/registry.go:224
↓ 1 callers
Function
setDeadline
Set up deadline for the lambda to proactively clean up its data before the invocation timeout. We don't want to keep data in storage when the Lambda r
functions/source/soci-index-generator-lambda/handler.go:267
↓ 1 callers
Function
validateEvent
Validate the given event, populating the context with relevant valid event properties
functions/source/soci-index-generator-lambda/handler.go:156
↓ 1 callers
Method
validateImageIndex
(ctx context.Context, repositoryName string, digest string)
functions/source/soci-index-generator-lambda/utils/registry/registry.go:181
↓ 1 callers
Function
validate_event
(event)
functions/source/ecr-image-action-event-filtering/ecr_image_action_event_filtering_lambda_function.py:79
Function
Error
(ctx context.Context, msg string, err error)
functions/source/soci-index-generator-lambda/utils/log/log.go:15
Function
Info
(ctx context.Context, msg string)
functions/source/soci-index-generator-lambda/utils/log/log.go:27
Function
TestGetFreeSpace
(t *testing.T)
functions/source/soci-index-generator-lambda/utils/fs/fs_test.go:8
Function
TestGetManifest
(t *testing.T)
functions/source/soci-index-generator-lambda/utils/registry/registry_test.go:68
Function
TestHandlerHappyPath
This test ensures that the handler can pull Docker and OCI images, build, and push the SOCI index back to the repository. To run this test locally, yo
functions/source/soci-index-generator-lambda/handler_test.go:23
Function
TestHandlerInvalidDigestMediaType
This test ensures that the handler can validate the input digest media type To run this test locally, you need to push an image to a private ECR repos
functions/source/soci-index-generator-lambda/handler_test.go:83
Function
TestHeadManifest
(t *testing.T)
functions/source/soci-index-generator-lambda/utils/registry/registry_test.go:19
Function
Warn
(ctx context.Context, msg string)
functions/source/soci-index-generator-lambda/utils/log/log.go:21
Function
lambda_handler
Handler - Meant to be invoked by EventBridge for ECR Image Action events. sample event data from EventBridge: { "version
functions/source/ecr-image-action-event-filtering/ecr_image_action_event_filtering_lambda_function.py:11
Function
main
()
functions/source/soci-index-generator-lambda/handler.go:380