@@ -56,6 +56,7 @@ var regions = []string{
5656 "ap-southeast-3" ,
5757 "ap-southeast-4" ,
5858 "ca-central-1" ,
59+ "ca-west-1" ,
5960 "eu-central-1" ,
6061 "eu-central-2" ,
6162 "eu-north-1" ,
@@ -75,7 +76,7 @@ var regions = []string{
7576}
7677
7778// Add regions that only support x86_64
78- var singleArchitectureRegions = []string {}
79+ var singleArchitectureRegions = []string {"ca-west-1" }
7980
8081// getLayerVersion returns the latest version of a layer in a region
8182func getLayerVersion (ctx context.Context , layerName string , region string ) (int64 , error ) {
@@ -149,6 +150,11 @@ func balanceRegionToVersion(ctx context.Context, region string, layer *LayerInfo
149150 return fmt .Errorf ("error getting layer version: %w" , err )
150151 }
151152
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+
152158 cfg , err := config .LoadDefaultConfig (ctx , config .WithRegion (region ))
153159 if err != nil {
154160 return err
@@ -172,7 +178,7 @@ func balanceRegionToVersion(ctx context.Context, region string, layer *LayerInfo
172178 ZipFile : payload ,
173179 },
174180 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 },
176182 Description : aws .String (layer .Description ),
177183 LicenseInfo : aws .String ("MIT-0" ),
178184 })
@@ -183,7 +189,7 @@ func balanceRegionToVersion(ctx context.Context, region string, layer *LayerInfo
183189 },
184190 LayerName : aws .String (layer .Name ),
185191 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 },
187193 Description : aws .String (layer .Description ),
188194 LicenseInfo : aws .String ("MIT-0" ),
189195 })
0 commit comments