add iam global endpoint exception
All checks were successful
AWS-Zig Build / build-zig-amd64-host (push) Successful in 1m29s

This commit is contained in:
Emil Lerch 2024-08-23 14:40:56 -07:00
parent b048b1193d
commit 43238a97eb
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -338,6 +338,26 @@ fn endpointException(
dualstack: []const u8, dualstack: []const u8,
domain: []const u8, domain: []const u8,
) !?EndPoint { ) !?EndPoint {
// Global endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#global-endpoints):
// Amazon CloudFront
// AWS Global Accelerator
// AWS Identity and Access Management (IAM)
// AWS Network Manager
// AWS Organizations
// Amazon Route 53
// AWS Shield Advanced
// AWS WAF Classic
if (std.mem.eql(u8, service, "iam")) {
return EndPoint{
.uri = try allocator.dupe(u8, "https://iam.amazonaws.com"),
.host = try allocator.dupe(u8, "iam.amazonaws.com"),
.scheme = "https",
.port = 443,
.allocator = allocator,
.path = try allocator.dupe(u8, request.path),
};
}
if (std.mem.eql(u8, service, "cloudfront")) { if (std.mem.eql(u8, service, "cloudfront")) {
return EndPoint{ return EndPoint{
.uri = try allocator.dupe(u8, "https://cloudfront.amazonaws.com"), .uri = try allocator.dupe(u8, "https://cloudfront.amazonaws.com"),