Skip to main content

AWS Elastic Container Registry ExecModule

Overview​

AwsEcrModule brings bounded Amazon Elastic Container Registry discovery, image inventory, aggregate vulnerability scan state, and carefully confirmed registry controls into ValkyrAI workflows. Platform, release, and security workflows can reconcile the repository and image they intend to use, require immutable tags and scan-on-push, start one exact scan, remove reviewed stale images, or retire one exact repository without exposing ECR authorization tokens, image manifests, layer download URLs, repository policies, lifecycle policy bodies, signing configuration, or arbitrary provider requests.

The connector implements eleven operations:

  • list_repositories and get_repository discover repositories and read one exact repository's identity and security settings.
  • create_repository creates one exact repository with an explicit encryption, scan-on-push, and tag-mutability posture.
  • delete_repository deletes one exact repository after confirmation, with an explicit force choice.
  • list_images discovers bounded image digest/tag identifiers.
  • describe_images reads bounded image metadata for all images or up to 100 exact identifiers.
  • describe_scan_findings reads aggregate severity counts and scan timing for one exact image without returning vulnerability descriptions.
  • start_image_scan requests a scan for one exact image after confirmation.
  • update_scan_on_push and update_tag_mutability change one exact repository security setting after confirmation.
  • delete_images deletes one to 100 exact digest or tag identifiers after confirmation.

n8n's reusable AWS credential plus resource/operation/action workflow pattern is the functional reference. ValkyrAI follows its native IntegrationAccount contract and adds strict operation-specific allowlists, bounded identifiers and pagination, raw-credential rejection, confidential normalized output, read-only retry, and single-attempt mutations that must be reconciled before replay.

Usage​

  1. Identify the AWS registry, region, repository, and exact image digests or tags the workflow may inspect or change.
  2. Create a least-privilege AWS principal with only the ECR actions and repository resources the reviewed workflow requires.
  3. Store the access key ID and secret access key in an AWS IntegrationAccount; verify it and keep it in READY status.
  4. Add AwsEcrModule and bind the account through ExecModuleConfig.authConfig.integrationAccount.
  5. Use get_repository, list_images, and describe_images to reconcile the exact repository and immutable digest before a deployment decision.
  6. Use describe_scan_findings to read the authoritative aggregate scan state. Do not infer scan completion from image metadata alone.
  7. Set the relevant confirmation flag only after the exact target and requested mutation have been reviewed.
  8. Persist the AWS request ID and returned resource identity, then use a read operation to reconcile final state.

Never put access keys, secret keys, session tokens, authorization tokens, credential objects, repository policies, lifecycle policies, registry policies, image manifests, layer content, Docker credentials, or arbitrary provider request fields in module input. Raw credential-shaped fields and every undocumented override fail before network access. Repository names, image digests and tags, registry IDs, scan counts, timestamps, request IDs, and repository URIs are confidential workflow data.

Inputs​

NameTypeRequired forDefaultConstraints
operationstringEvery executionNoneOne of the eleven documented operations.
regionstringEvery executionNoneValid AWS region such as us-west-2.
registryIdstringOptional read/control scopeCurrent accountExactly 12 digits. Not accepted for create_repository, which creates in the caller's registry.
repositoryNamestringExact repository/image operationsNoneLowercase ECR name, 1-256 characters, with bounded /, ., _, and - separators.
nextTokenstringOptional list fieldNoneOpaque provider token, at most 4,096 characters.
limitintegerList operations100Total result bound from 1 through 1,000.
returnAllbooleanList operationsfalseFollow pages until limit, provider exhaustion, or 100 pages.
imageDigeststringOptional exact-image shorthandNoneExact sha256: digest with 64 hexadecimal characters.
imageTagstringOptional exact-image shorthandNoneOne valid tag of at most 128 characters.
imageIdsarrayOptional describe_images; required delete_images unless shorthand is usedNoneOne to 100 objects, each with exactly one imageDigest or imageTag.
tagStatusstringlist_images, unscoped describe_imagesANYANY, TAGGED, or UNTAGGED.
scanOnPushbooleanCreate or scan-setting updatetrueExact desired repository setting.
tagMutabilitystringCreate or mutability updateIMMUTABLEMUTABLE or IMMUTABLE.
encryptionTypestringcreate_repositoryAES256AES256 or KMS.
kmsKeystringKMS-encrypted createNoneRequired for KMS; forbidden for AES256; bounded to 2,048 characters.
forcebooleanOptional repository delete fieldfalseWhen true, asks ECR to delete a non-empty repository.
confirmCreateRepositorybooleancreate_repositoryfalseMust be exactly true.
confirmDeleteRepositorybooleandelete_repositoryfalseMust be exactly true.
confirmStartScanbooleanstart_image_scanfalseMust be exactly true.
confirmUpdatebooleanRepository setting updatesfalseMust be exactly true.
confirmDeleteImagesbooleandelete_imagesfalseMust be exactly true.

For an image identifier, provide a digest or a tag, never both. describe_scan_findings and start_image_scan require exactly one image identifier. delete_images accepts up to 100 unique identifiers. Unexpected fields fail before provider access, preventing hidden policy, lifecycle, signing, replication, tag-exclusion, registry, manifest, token, and layer mutations.

Outputs​

Every call returns stable status, operation, and attempts fields.

NameTypeWhen presentDescription
statusstringAlwayssuccess or error.
operationstringAlwaysNormalized operation.
attemptsintegerAlwaysProvider calls including pages and retry-safe reads.
resultTypestringSuccessRepository, image, scan, or control family.
itemsarrayList successBounded normalized repositories, image identifiers, or image details.
countintegerList successNumber of returned items.
pagesintegerList successProvider pages consumed.
hasMorebooleanList successWhether ECR returned another token.
nextTokenstringAnother page existsOpaque continuation token.
dataobjectExact read or control successNormalized repository, scan summary, or mutation receipt.
requestIdstringAWS supplies oneBounded provider reference for reconciliation.
errorobjectFailureSafe {code, message, httpStatus?, retryable} details.

Repository output includes identity, ARN, URI, creation time, tag mutability, scan-on-push, and encryption configuration. KMS key identity is returned as confidential configuration, not key material. Image output includes bounded registry/repository identity, digest, tags, compressed size, push/pull timing, and media types. It never returns an authorization token, image manifest, layer URL, layer bytes, repository policy, lifecycle policy, scan vulnerability descriptions, or provider error text.

describe_scan_findings returns the exact image identifier, scan status and bounded description, scan timing, aggregate counts by severity, and whether ECR indicated additional finding pages. Individual finding titles, package paths, descriptions, CVE details, reference URLs, source metadata, and remediation text are deliberately excluded from this first release.

IntegrationAccount Requirements​

Bind one AWS IntegrationAccount through the normalized ExecModule authentication relationship:

FieldRequirement
ProviderAmazon Web Services / ECR
statusMust be READY.
verifiedMust be true.
apiKey SecureFieldAWS access key ID.
password SecureFieldAWS secret access key.

Grant only actions used by the reviewed workflow:

  • Repository discovery: ecr:DescribeRepositories.
  • Image inventory and metadata: ecr:ListImages and ecr:DescribeImages.
  • Scan state: ecr:DescribeImageScanFindings and, only when required, ecr:StartImageScan.
  • Creation and security settings: ecr:CreateRepository, ecr:PutImageScanningConfiguration, and ecr:PutImageTagMutability only for approved repositories.
  • Cleanup: ecr:BatchDeleteImage and/or ecr:DeleteRepository only for explicitly governed resources.
  • KMS: allow the exact ECR/KMS actions required by the chosen customer-managed key when creating KMS-encrypted repositories.

Use repository resource constraints, AWS resource tags, permissions boundaries, organization service-control policies, separate read/control accounts, and KMS key policy to reduce blast radius. Prefer a read-only account unless creation, configuration change, scan initiation, image deletion, or repository deletion is an explicit workflow requirement. ecr:GetAuthorizationToken is neither required nor called by this module.

Configuration​

The awsAccount relationship is the only credential configuration. Operation, exact resource identity, pagination, security settings, image identifiers, and confirmations belong in mapped input or module parameters.

{
"version": "1.0.0",
"authConfig": {
"authStrategy": 1,
"integrationAccount": "integration-account:aws-ecr-release"
},
"payloadConfig": {
"parameters": "{\"operation\":\"describe_images\",\"region\":\"us-west-2\"}"
}
}

The relationship value is illustrative. Persisted workflows bind the generated IntegrationAccount relationship, never plaintext credentials.

Operations​

OperationProvider behaviorSide effect and retry behavior
list_repositoriesLists bounded repositories in the selected registry.Read-only; each page retries transient failures.
get_repositoryReads one exact repository's identity and security settings.Read-only; bounded retry.
create_repositoryCreates one repository with exact encryption, scan-on-push, and mutability settings.Confirmed external mutation; exactly one attempt.
delete_repositoryDeletes one exact repository; force controls non-empty deletion.Confirmed destructive mutation; exactly one attempt.
list_imagesLists bounded digest/tag identifiers, optionally filtered by tag state.Read-only; each page retries transient failures.
describe_imagesReads bounded image metadata for all images or exact identifiers.Read-only; each page retries when pagination applies.
describe_scan_findingsReads aggregate severity counts and scan timing for one image.Read-only; bounded retry.
start_image_scanRequests a new basic scan for one exact image.Confirmed billable/provider-limited mutation; exactly one attempt.
update_scan_on_pushChanges the repository's scan-on-push setting.Confirmed security-setting mutation; exactly one attempt.
update_tag_mutabilityChanges repository tags between mutable and immutable.Confirmed supply-chain setting mutation; exactly one attempt.
delete_imagesDeletes one to 100 exact image identifiers.Confirmed destructive mutation; exactly one attempt.

Errors and Failure Modes​

CodeTypical causeRetryableResolution
VALIDATION_ERRORMissing/malformed region, registry, repository, image, bound, setting, or confirmation; ambiguous image identifier; or undocumented override.NoCorrect the named input; no AWS request was sent.
UNSUPPORTED_OPERATIONUnknown operation.NoSelect a documented operation.
INTEGRATION_ACCOUNT_ERRORAccount missing, unverified, not READY, or missing key material.NoRepair and bind the AWS account.
AWS_ECR_HTTP_400Invalid resource, incompatible setting, unsupported image state, scan state, or provider request.Usually noRead the exact repository and image before deciding.
AWS_ECR_HTTP_403IAM, SCP, KMS, repository, tag, or resource policy denied the request.NoGrant only the missing action or revise the governed workflow.
AWS_ECR_HTTP_404Exact repository or image does not exist in the selected registry and region.NoReconcile region, registry, repository, digest, and tag.
AWS_ECR_HTTP_409Repository or image state conflicts with the requested mutation.NoRead current state and choose whether the action remains appropriate.
AWS_ECR_HTTP_429 / 500 / 503Throttle or transient provider pressure.Reads retry; writes remain single-attemptReconcile registry state before mutation replay.
NETWORK_ERRORDNS, TLS, timeout, or connectivity failure.Reads retry; writes report ambiguityTreat mutation acceptance as unknown until state is read.
EXECUTION_ERRORUnexpected bounded runtime failure.No automatic replayPreserve operation and request evidence for investigation.

Provider exception messages are never copied into workflow output. This prevents credentials, repository policy data, image identity, KMS configuration, registry topology, and provider state from leaking through failures.

Example​

Read one release image by immutable digest:

{
"operation": "describe_images",
"region": "us-west-2",
"registryId": "012345678910",
"repositoryName": "valkyrai/app",
"imageDigest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}

Expected result shape:

{
"status": "success",
"operation": "describe_images",
"attempts": 1,
"resultType": "images",
"items": [
{
"registryId": "012345678910",
"repositoryName": "valkyrai/app",
"imageDigest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"imageTags": ["release-2026-10-23"],
"imageSizeBytes": 184320000,
"pushedAt": "2026-10-23T02:00:00Z"
}
],
"count": 1,
"pages": 1,
"hasMore": false,
"requestId": "aws-request-reference"
}

Use the exact digest with describe_scan_findings. Continue only after the returned scan state and aggregate severity counts meet the workflow's separately reviewed release policy. Image existence or a successful scan request does not prove that the image is safe, signed, deployable, or currently used by a service.

Notes​

  • Pagination: repository and image list operations accept an opaque nextToken; all loops stop at limit, provider exhaustion, or 100 pages. Exact imageIds requests are sent as one bounded batch and are not paginated.
  • Rate limits: AWS SDK internal retries are disabled. ValkyrAI applies bounded backoff only to reads and honors ExecModule retry attempts from 1 through 5.
  • Idempotency: reads are retry-safe. Create, delete, update, start-scan, and batch-delete operations are issued exactly once. Preserve the exact target and request ID, then reconcile before any manual replay.
  • API limits: imageIds is capped at 100. The module's total list limit is capped at 1,000 and its page loop at 100 even when ECR has more results.
  • Eventual consistency: newly created repositories, setting changes, scans, and deletions may not appear uniformly at once. A successful mutation response proves provider acceptance, not every downstream registry or deployment observation.
  • Image identity: mutable tags can move. Production release workflows should resolve and persist an immutable digest, set IMMUTABLE where appropriate, and compare the deployed digest rather than trust a tag alone.
  • Scanning: Amazon ECR scanning modes and quotas vary. describe_scan_findings is authoritative for the supported aggregate scan result; describe_images deliberately does not infer current scan findings.
  • Destructive behavior: delete_images can remove tags or manifests depending on the identifier and registry state. delete_repository with force: true can remove every image in the repository. Both require explicit confirmation and remain single-attempt.
  • Encryption: ECR repository encryption configuration is chosen at creation. KMS behavior depends on key policy and AWS service permissions; the module validates bounded syntax but AWS remains authoritative.
  • Secret safety: the module never calls GetAuthorizationToken, never outputs Docker credentials, and does not accept image manifests, layer bytes, repository policies, lifecycle policies, signing configuration, or arbitrary provider payloads.
  • Deferred scope: authorization-token retrieval, Docker push/pull, manifest upload/download, layer transfer, repository/lifecycle/registry policy management, replication, pull-through cache, signing, resource tags, enhanced finding details, scan configuration at registry scope, tag-mutability exclusion filters, and waiters are intentionally excluded.
  • External verification: repository tests use a deterministic transport and make no AWS call. Provider behavior requires a separately authorized least-privilege AWS account plus reviewed registry, repository, image, KMS, and mutation scope.