@@ -56,6 +56,7 @@ var regions = []string{
56
56
"ap-southeast-3" ,
57
57
"ap-southeast-4" ,
58
58
"ca-central-1" ,
59
+ "ca-west-1" ,
59
60
"eu-central-1" ,
60
61
"eu-central-2" ,
61
62
"eu-north-1" ,
@@ -75,7 +76,7 @@ var regions = []string{
75
76
}
76
77
77
78
// Add regions that only support x86_64
78
- var singleArchitectureRegions = []string {}
79
+ var singleArchitectureRegions = []string {"ca-west-1" }
79
80
80
81
// getLayerVersion returns the latest version of a layer in a region
81
82
func getLayerVersion (ctx context.Context , layerName string , region string ) (int64 , error ) {
@@ -149,6 +150,11 @@ func balanceRegionToVersion(ctx context.Context, region string, layer *LayerInfo
149
150
return fmt .Errorf ("error getting layer version: %w" , err )
150
151
}
151
152
153
+ if currentLayerVersion == 0 {
154
+ log .Printf ("[%s] No layers found in region %s, stating with version 1" , layer .Name , region )
155
+ currentLayerVersion = 1
156
+ }
157
+
152
158
cfg , err := config .LoadDefaultConfig (ctx , config .WithRegion (region ))
153
159
if err != nil {
154
160
return err
@@ -172,7 +178,7 @@ func balanceRegionToVersion(ctx context.Context, region string, layer *LayerInfo
172
178
ZipFile : payload ,
173
179
},
174
180
LayerName : aws .String (layer .Name ),
175
- CompatibleRuntimes : []types.Runtime {types .RuntimePython37 , types .RuntimePython38 , types .RuntimePython39 , types .RuntimePython310 , types .RuntimePython311 },
181
+ CompatibleRuntimes : []types.Runtime {types .RuntimePython37 , types .RuntimePython38 , types .RuntimePython39 , types .RuntimePython310 , types .RuntimePython311 , types . RuntimePython312 },
176
182
Description : aws .String (layer .Description ),
177
183
LicenseInfo : aws .String ("MIT-0" ),
178
184
})
@@ -183,7 +189,7 @@ func balanceRegionToVersion(ctx context.Context, region string, layer *LayerInfo
183
189
},
184
190
LayerName : aws .String (layer .Name ),
185
191
CompatibleArchitectures : []types.Architecture {layer .Architecture },
186
- CompatibleRuntimes : []types.Runtime {types .RuntimePython37 , types .RuntimePython38 , types .RuntimePython39 , types .RuntimePython310 , types .RuntimePython311 },
192
+ CompatibleRuntimes : []types.Runtime {types .RuntimePython37 , types .RuntimePython38 , types .RuntimePython39 , types .RuntimePython310 , types .RuntimePython311 , types . RuntimePython312 },
187
193
Description : aws .String (layer .Description ),
188
194
LicenseInfo : aws .String ("MIT-0" ),
189
195
})
0 commit comments