Skip to content

AWS paths

On AWS the two required paths are an ECR registry root and an s3:// bucket path.

The registry

<account>.dkr.ecr.<region>.amazonaws.com/<repository>
--artifact-registry <aws-account-id>.dkr.ecr.<region>.amazonaws.com/<repository>

The account and region in the host should match --account-id and --region.

A host with no repository root is refused:

artifact_registry.path must be a full registry root path (<registry-host>/<repository_root>)

The runtime image derived from it

With no --runtime-image:

runtime:
  image: <aws-account-id>.dkr.ecr.<region>.amazonaws.com/<repository>/xratu-data-plane:latest

The bucket

s3://<bucket>/<prefix>
--artifact-bucket s3://<bucket>/<prefix>

Unlike GCP, the prefix here does restrict the grant. The bucket name and the prefix land in two separate statements:

    Statement = [
      {
        Effect = "Allow"
        Action = ["s3:ListBucket", "s3:GetBucketLocation"]
        Resource = ["arn:aws:s3:::<bucket>"]
      },
      {
        Effect = "Allow"
        Action = ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"]
        Resource = ["arn:aws:s3:::<bucket>/<prefix>/*"]
      }
    ]

Listing is bucket-wide; object access is confined to the prefix. A shared bucket is therefore safer on AWS than on the other clouds without editing anything.

The scheme must match the provider

artifact_bucket.path scheme must match provider (gcp=gcs://, aws=s3://, azure=azblob://)

Both must already exist

The repository and the bucket are yours. Terraform creates roles and policies and grants them access.

aws ecr describe-repositories --repository-names <repository> --region <region>
aws s3api head-bucket --bucket <bucket>

An S3 policy referencing a bucket that does not exist still applies cleanly, because an ARN in a policy document is not resolved at creation. That failure surfaces later as a node unable to read or write, so check the bucket before apply rather than after.

Adding them to the bundle's own terraform/main.tf is possible and is a poor place to own them, for reasons covered in Registry and bucket schemes.

On a private network

provider_config:
  aws_sts_endpoint: https://sts.<region>.amazonaws.com
  aws_ecr_api_endpoint: https://api.ecr.<region>.amazonaws.com

Set these to your VPC endpoints where the node reaches AWS privately. See Air-gapped deployment.