Summary
go get of the prebuilt AWS provider for Go fails for recent major versions because the module source tree exceeds the Go module proxy / checksum-DB limit of 500 MB (524288000 bytes):
> go get github.com/cdktn-io/cdktn-provider-aws-go/aws/v25
go: downloading github.com/cdktn-io/cdktn-provider-aws-go/aws/v25 v25.3.0
go: github.com/cdktn-io/cdktn-provider-aws-go/aws/v25: create zip: module source tree too large (max size is 524288000 bytes)
This is a hard limit on proxy.golang.org and sum.golang.org (and enforced by the Go toolchain when it creates the module zip on the direct fallback). Publishing the module works fine — it's consumption that breaks.
We should document the user-side workaround in the cdktn docs, since there is nothing we can fix on the publishing side.
Workaround
Bypass the proxy and checksum verification for the affected module path:
GOPRIVATE=github.com/cdktn-io/cdktn-provider-aws-go go get github.com/cdktn-io/cdktn-provider-aws-go/aws/v25
Note: GOPROXY=direct alone is not sufficient — checksum verification against sum.golang.org still fails with the same size limit. GOPRIVATE (which implies both GONOPROXY and GONOSUMDB) is required.
Observed behavior per major version (with GOPRIVATE set)
| Version |
Result |
aws/v21 |
✅ works (even without workaround) |
aws/v22 (v22.1.0) |
✅ works |
aws/v23 (v23.8.0) |
✅ works |
aws/v24 (v24.12.0) |
❌ create zip: module source tree too large |
aws/v25 (v25.3.0) |
❌ create zip: module source tree too large |
Open question
Even with GOPRIVATE, v24/v25 still fail at the create zip step: in direct mode the Go toolchain itself creates the module zip and applies the same 500 MB limit to the uncompressed file tree, so sufficiently large versions cannot be consumed via go get/go mod at all.
It's not obvious why v22/v23 pass while v24/v25 don't — a checkout of v22 is ~579 MB on disk, which is over the limit. Likely explanation: the on-disk size includes .git (and possibly other files excluded from the module zip), so the actual zipped source tree for v22/v23 is still under 500 MB, while v24/v25 crossed it. Worth verifying and documenting the size trajectory, since every major version gets closer to being completely unconsumable via the Go toolchain.
Proposed actions
References
Summary
go getof the prebuilt AWS provider for Go fails for recent major versions because the module source tree exceeds the Go module proxy / checksum-DB limit of 500 MB (524288000 bytes):This is a hard limit on proxy.golang.org and sum.golang.org (and enforced by the Go toolchain when it creates the module zip on the direct fallback). Publishing the module works fine — it's consumption that breaks.
We should document the user-side workaround in the cdktn docs, since there is nothing we can fix on the publishing side.
Workaround
Bypass the proxy and checksum verification for the affected module path:
Note:
GOPROXY=directalone is not sufficient — checksum verification against sum.golang.org still fails with the same size limit.GOPRIVATE(which implies bothGONOPROXYandGONOSUMDB) is required.Observed behavior per major version (with
GOPRIVATEset)aws/v21aws/v22(v22.1.0)aws/v23(v23.8.0)aws/v24(v24.12.0)create zip: module source tree too largeaws/v25(v25.3.0)create zip: module source tree too largeOpen question
Even with
GOPRIVATE, v24/v25 still fail at thecreate zipstep: in direct mode the Go toolchain itself creates the module zip and applies the same 500 MB limit to the uncompressed file tree, so sufficiently large versions cannot be consumed viago get/go modat all.It's not obvious why v22/v23 pass while v24/v25 don't — a checkout of v22 is ~579 MB on disk, which is over the limit. Likely explanation: the on-disk size includes
.git(and possibly other files excluded from the module zip), so the actual zipped source tree for v22/v23 is still under 500 MB, while v24/v25 crossed it. Worth verifying and documenting the size trajectory, since every major version gets closer to being completely unconsumable via the Go toolchain.Proposed actions
GOPRIVATEworkaround, and note that very large versions (currentlyaws/v24+) cannot be fetched viago getat all.References
module source tree too large (max size is 524288000 bytes)