A Workday → Antenna sync example on AWS. EventBridge runs a Lambda that reads a Workday RaaS custom report, matches people to Antenna identities, and updates changed fields. Credentials live in Secrets Manager; failures alert through SNS.
- A Workday reporting/security administrator to configure and verify the report and integration access.
- Python 3.12+, AWS CLI v2, and an approved AWS deployment identity.
- An existing versioned S3 bucket in the deployment account and region, secured through the customer's artifact/release policies.
Start in a sandbox:
- Create a dedicated Integration System User (ISU) with read-only access to the approved worker population and fields. Verify report sharing, data-source/field permissions, and API scopes.
- Create an Advanced custom report, enable it as a web service, and return one row per worker. Set column/XML aliases to match the synthetic report. Verify filters, prompts, security, and row limits against the expected headcount.
- Register an API Client for Integrations with the appropriate RaaS scope. Use Manage Refresh Tokens for Integrations to issue an ISU refresh token; retain the client ID and secret securely.
- Copy the report's JSON URL from Web Service → View URLs, including
format=json, and the token endpoint from the API client configuration.
Authentication follows Workday's RaaS client pattern: exchange an integration refresh token for an access token, then GET the report with bearer authentication. Verify this flow for your tenant. The example requires a reusable refresh token; it does not store replacements from rotating-token flows.
Report fields and value formats
The response must contain a Report_Entry array. These are custom aliases for this example, not standard Workday API field names.
| Alias | Purpose |
|---|---|
Employee_ID |
Required non-empty string; duplicate check only |
Display_Name |
Required person name |
Work_Email |
Work email; required to create an unmatched identity |
Job_Title, Manager_Name |
Role and manager's display name |
Teams, Product_Lines |
Semicolon-separated text or arrays of strings |
Business_Unit, Department, Company, Location, Employment_Type |
Organization details |
Seniority_Override, Role_Category_Override |
Optional explicit overrides |
Fully_Excluded |
Boolean or text true/false/1/0; never map employment status here |
GitHub_ID |
Optional linked GitHub user ID, if stored in your source |
Omit/null optional fields to preserve Antenna values. Empty strings/arrays may clear fields; blank overrides reset detection. Empty team text becomes an empty list; blank Fully_Excluded is omitted. Flatten nested Workday objects in the report or connector.
| File | What to edit |
|---|---|
| workday_config.json | Report/token URLs and roster/change limits; set a realistic min_records |
| field_mappings.json | Report aliases for all supported Antenna fields |
| deploy_config.json | AWS region/profile, bucket, stack name, alert email, and schedule |
Keep dry_run: true and schedule_enabled: false for onboarding. Store actual credentials only in Secrets Manager.
python3 scripts/deploy.py --check
python3 scripts/deploy.py--check validates local settings and builds the ZIP without AWS calls. Deployment uploads the package and creates/updates one CloudFormation stack, printing the Lambda name, secret ARN, and SNS topic ARN. It uses the uploaded object's immutable version and incurs AWS charges. Use --config path/to/customer-deploy.json for alternate deployment settings; Workday config/mappings always come from the current checkout.
In Secrets Manager, replace the output secret's entire bootstrap value with:
{
"antenna_api_key": "YOUR_ANTENNA_ENTERPRISE_KEY",
"workday_client_id": "YOUR_WORKDAY_CLIENT_ID",
"workday_client_secret": "YOUR_WORKDAY_CLIENT_SECRET",
"workday_refresh_token": "YOUR_ISU_INTEGRATION_REFRESH_TOKEN"
}- Confirm the SNS email subscription or connect your incident system to the output topic.
- Invoke Lambda manually in the AWS console. Review dry-run counts and validate matches/report completeness under the customer's approved access process.
- Set
dry_run: false, redeploy, and verify one controlled manual write run in Antenna. - Set
schedule_enabled: trueand redeploy to start scheduled runs. Review both settings on every update.
- Matching: linked account ID → email → display name unique in both datasets. Ambiguous keys, duplicate workers, and multiple people claiming one identity reject the plan before writes.
Employee_IDis not a matching key. Review name fallback during renames/email reuse; correct duplicate manager names and cycles. - Changes: only changed fields are patched. Known managers run before reports. Missing workers are never deleted/excluded; ordinary leavers retain their history. Antenna maintains automatic groups; manual group memberships are outside this example.
- Report size: one complete JSON response, at most 4 MiB, with a 30-second request timeout. Record bounds default to 1–10,000 and the create/update limit to 100. Large/slow reports need an adapted export strategy. Verify headcount: these limits cannot detect every silent report omission.
- Security: HTTPS, origin checks, blocked redirects, scoped IAM, and sanitized logs remain enabled. GET/PATCH requests retry transient failures up to four attempts; refresh-token exchanges and identity creation are not automatically replayed.
- Recovery: later write failures can leave earlier writes committed. Investigate before retrying an uncertain creation. Logs retain for 30 days; use customer monitoring for disabled/undeliverable schedules alongside Lambda failure alerts.
- Credentials/networking: rotate credentials at their issuers and update Secrets Manager without redeploying. Revalidate access after ISU/report/security changes. Private endpoints or fixed egress IPs require customer networking changes. Export only approved identity data; no report snapshots or token checkpoints are persisted.
Deployment permissions, signed packages, and upgrades
Use an approved deployment role for the template resources, CloudFormation deploy/describe, IAM role passing, STS identity, and S3 bucket settings/upload/version access; customer-managed keys may require KMS access. The runtime role only reads its credential secret and writes logs. The customer owns bucket access, public-access blocking, encryption, TLS-only policy, retention, and release approvals. Keep active/rollback artifact versions. Inspect CloudFormation events for service-side deployment errors.
For customer-required signatures, set code_signing_config_arn and supply a signed package matching the checkout:
python3 scripts/deploy.py --artifact /absolute/path/customer-signed.zipThe helper requires both inputs, checks an Enforce policy and matching runtime files, and uploads the ZIP unchanged. Lambda verifies the signature; offline --check cannot. An empty ARN removes enforcement, including on updates.
When upgrading a generic checkout, configure workday_config.json, the report aliases/mappings, and the Workday credential keys before deploying. Keep the stack name/account/region to update the worker. Existing artifact infrastructure is not deleted or managed by this helper. Preserve the template's bootstrap secret property to avoid resetting stored credentials; replace its JSON deliberately in Secrets Manager.
PYTHONPATH=src python3 -m unittest discover -s tests -v
cfn-lint cloudformation/template.yamlTests use synthetic data and mocked services. Validate real Workday permissions, token expiry, malformed/incomplete reports, duplicate workers, field clearing, leavers, and log privacy in a sandbox before production.
To use another HR system, replace the configuration loader and fetch_people(credentials, config) implementation in workday.py, update imports/mappings, and add provider tests. The Antenna client, matching logic, HTTP safeguards, and AWS stack remain reusable.