Skip to main content

Send predictions to Amazon S3

An Amazon S3 destination writes link SNR forecasts and workflow results into a bucket you own, as gzipped JSON Lines. Your AWS account grants access to a role, and that role trusts Constellation's OpenID Connect (OIDC) issuer for your account only. No access keys change hands.

Send predictions out lists which forecasts a destination receives and how many destinations an account can have.

How the trust works​

  1. Constellation signs a token valid for five minutes for each delivery. Its issuer is Constellation's OIDC issuer, its audience is sts.amazonaws.com, and its subject is your account ID (acct_...).
  2. Constellation calls AWS STS AssumeRoleWithWebIdentity with that token and your role's ARN.
  3. AWS checks the token's signature against the issuer's published keys and checks that the subject is yours. Only then does it return temporary credentials for the role.
  4. Constellation writes the object with those temporary credentials.

A token for any other Constellation account carries a different subject, so your role refuses it.

What the stack creates​

The CloudFormation stack, constellation-destination-<bucket>, creates:

ResourcePurpose
IAM OIDC identity providerRegisters Constellation's issuer with audience sts.amazonaws.com. A Lambda-backed custom resource creates it, or reuses the one already in your AWS account, and never deletes it, so several stacks can share it.
IAM roleTrusts that provider only when the token's audience is sts.amazonaws.com and its subject is your account ID.
Role policyAllows s3:PutObject on arn:aws:s3:::<bucket>/<prefix>/* and nothing else.
S3 bucket (optional)Created only when Create this bucket for me is checked: encrypted, private, and kept when the stack is deleted.

Its RoleArn output is the value you paste into the Platform. With an existing bucket, the stack does not change the bucket.

Connect​

  1. Open Integrations, Results out in the Platform, choose Add connection, then Amazon S3. Enter the bucket name. Leave Create this bucket for me checked to have the stack create it, or clear it to use a bucket that already exists in your AWS account. Under Advanced, set the folder (prefix, default constellation) and the bucket's region (default us-east-1).
  2. Choose Connect your AWS account. CloudFormation opens in that region with the template and parameters filled in. Acknowledge that it creates IAM resources and create the stack.
  3. When the stack shows CREATE_COMPLETE, copy the RoleArn output and paste it into Paste the RoleArn. The Platform connects as soon as it reads a valid ARN; otherwise choose Connect.
  4. Constellation first writes a check object, _constellation_check.json, under the prefix. If AWS refuses it, the form shows the reason AWS gave and nothing is added. Once the check passes, the destination is added as Connected. It turns Live once a delivery reaches it.

Use Send a test on a connected destination to write another check object. To change the bucket, folder, region or role later, edit them in its detail and choose Save: the new settings are checked first, and the old ones keep working if the check fails. Pause stops deliveries until Resume, which checks the destination first: if the check fails, it says why and stays paused.

Object layout​

s3://<bucket>/<prefix>/model=<family>/date=YYYY-MM-DD/hour=HH/<object>.jsonl.gz

family is snr. The date and hour are when the forecasts were served, in UTC. Each line is one prediction, with the fields of an item from GET /predictions plus account_id and served_at:

{"link_id": "link-a", "horizon_minutes": 1, "predicted_at": "2026-10-06T12:00:05Z", "assignment_id": "asg-example", "model_version": "snr-baseline-v1", "lease_id": "lease-example", "value": {"snr_db_p10": 8.99, "snr_db_p50": 9.33, "snr_db_p90": 9.66}, "feature_view_id": "snr-features-v1", "model_release_id": "snr-release-example", "traffic_role": "active", "status": null, "reason": null, "account_id": "acct_example", "served_at": "2026-10-06T12:00:06.418302+00:00"}

A workflow run's items go under s3://<bucket>/<prefix>/workflow=<slug>/date=YYYY-MM-DD/hour=HH/<object>.jsonl.gz, dated when the run was delivered. Each line is one item as GET /predictions?run_id= returns it, with the columns the destination output names, plus workflow (the slug), version, account_id and served_at.

Query with Athena​

Partition projection lets Athena find new hours without a crawler. Replace the bucket and prefix:

CREATE EXTERNAL TABLE constellation_predictions (
link_id string,
horizon_minutes int,
predicted_at string,
model_version string,
feature_view_id string,
model_release_id string,
value map<string, double>,
account_id string,
served_at string
)
PARTITIONED BY (model string, `date` string, `hour` string)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
LOCATION 's3://my-fleet-data/constellation/'
TBLPROPERTIES (
'projection.enabled' = 'true',
'projection.model.type' = 'enum',
'projection.model.values' = 'snr',
'projection.date.type' = 'date',
'projection.date.format' = 'yyyy-MM-dd',
'projection.date.range' = '2026-01-01,NOW',
'projection.hour.type' = 'integer',
'projection.hour.range' = '0,23',
'projection.hour.digits' = '2',
'storage.location.template' = 's3://my-fleet-data/constellation/model=${model}/date=${date}/hour=${hour}/'
);

-- Weakest links one minute ahead today
SELECT link_id, min(value['snr_db_p50']) AS snr_p50_db
FROM constellation_predictions
WHERE model = 'snr' AND "date" = cast(current_date AS varchar) AND horizon_minutes = 1
GROUP BY link_id
ORDER BY snr_p50_db
LIMIT 10;

Revoke​

Delete the constellation-destination-<bucket> stack. The role disappears, so the next delivery fails and the destination shows Failing. Then choose Delete connection on the destination to stop attempts. Objects already written stay in your bucket, and so do the bucket and the OIDC identity provider.

Troubleshooting​

SymptomCause and fix
Failing: "AWS refused to let Constellation assume the role"The ARN is not the stack's RoleArn output, or the stack was created for another Constellation account. Choose Connect your AWS account again from this account's Results out.
Failing: "AWS found no Constellation identity provider in the role's AWS account (InvalidIdentityToken)"The role is in an AWS account where the stack never ran, so the OIDC identity provider it trusts does not exist there. Choose Connect your AWS account in that account to create the stack, then paste its RoleArn.
Failing: "AWS refused the write to the bucket (AccessDenied)"The bucket or prefix differs from the stack's parameters, or a bucket policy denies the role. Encrypted buckets using a customer managed KMS key also need the key policy to allow the role kms:GenerateDataKey.
Failing: "AWS refused the write to the bucket" with NoSuchBucket, PermanentRedirect, or AuthorizationHeaderMalformedThe bucket name or region is wrong. Correct them in the destination's detail and choose Save.
Live, but no new objectsDestinations receive only forecasts read by link_ids, never for links of the demo fleet, and workflow runs with a destination output. Request forecasts through the API or an AI agent.
Delivery is off in this environmentDestinations are switched off in this environment. Read forecasts from the API instead.