Skip to content

feat: add AWS PRM user-agent attribution for partner revenue tracking#23138

Merged
DevelopmentCats merged 7 commits into
mainfrom
feat/aws-prm-user-agent
Apr 6, 2026
Merged

feat: add AWS PRM user-agent attribution for partner revenue tracking#23138
DevelopmentCats merged 7 commits into
mainfrom
feat/aws-prm-user-agent

Conversation

@blinkagent
Copy link
Copy Markdown
Contributor

@blinkagent blinkagent Bot commented Mar 16, 2026

Sets AWS_SDK_UA_APP_ID in the Terraform provisioner environment so that all AWS API calls made during workspace builds include Coder's AWS Partner Revenue Measurement (PRM) attribution in the user-agent header.

This enables AWS to attribute resource usage driven by Coder back to us as an AWS partner across all deployments.

How it works

  • provisionEnv() now unconditionally sets AWS_SDK_UA_APP_ID=APN_1.1/pc_cdfmjwn8i6u8l9fwz8h82e4w3$ in the environment passed to terraform plan and terraform apply
  • The Terraform AWS provider picks this up and appends it to the user-agent header on every AWS API call
  • If a customer has already set AWS_SDK_UA_APP_ID in their environment (e.g. via coder.env), we don't override it
  • Templates that don't use the AWS provider are unaffected — the env var is simply ignored

Notes

  • The product code is hardcoded in the source. It may be worth obfuscating this value (e.g. via -ldflags -X at build time) to keep it out of the public repo, though it is technically a public identifier.
  • This covers user-agent attribution only. Resource-level aws-apn-id tags for cost allocation are a separate effort that requires template changes.

References

@blinkagent blinkagent Bot force-pushed the feat/aws-prm-user-agent branch from eb0e73c to 50b5588 Compare March 16, 2026 20:12
@blinkagent blinkagent Bot force-pushed the feat/aws-prm-user-agent branch from 50b5588 to c14074e Compare March 16, 2026 20:15
@DevelopmentCats DevelopmentCats self-assigned this Mar 16, 2026
@DevelopmentCats
Copy link
Copy Markdown
Contributor

After testing this thoroughly I can confirm that anything provisioned from coder with this Env being injected will add the vendor tag to the user agent every time.

@github-actions github-actions Bot added the stale This issue is like stale bread. label Mar 27, 2026
@github-actions github-actions Bot closed this Mar 30, 2026
Copy link
Copy Markdown
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Lets get a review from @greg-the-coder too.

Do we have any validation for this? Can we check this in some AWS partner portal?

@matifali matifali removed the stale This issue is like stale bread. label Apr 6, 2026
@DevelopmentCats
Copy link
Copy Markdown
Contributor

DevelopmentCats commented Apr 6, 2026

LGTM. Lets get a review from @greg-the-coder too.

Do we have any validation for this? Can we check this in some AWS partner portal?

I have validated this through AWS CloudTrail and it gets appended to all AWS requests from our provisioner properly.

We are following up with AWS to check it from their end, but that is the only thing we are waiting on.

@DevelopmentCats DevelopmentCats merged commit 5ff1058 into main Apr 6, 2026
31 checks passed
@DevelopmentCats DevelopmentCats deleted the feat/aws-prm-user-agent branch April 6, 2026 15:33
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants