This repository was archived by the owner on Jan 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +35
-0
lines changed Expand file tree Collapse file tree 5 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,13 @@ export type Credentials = {
29
29
export default ( {
30
30
credentials
31
31
} : CloudFrontClientFactoryOptions ) : CloudFrontClient => {
32
+ if ( AWS ?. config ) {
33
+ AWS . config . update ( {
34
+ maxRetries : parseInt ( process . env . SLS_NEXT_MAX_RETRIES ?? "10" ) ,
35
+ retryDelayOptions : { base : 200 }
36
+ } ) ;
37
+ }
38
+
32
39
const cloudFront = new AWS . CloudFront ( { credentials } ) ;
33
40
34
41
return {
Original file line number Diff line number Diff line change @@ -42,6 +42,13 @@ class CloudFront extends Component {
42
42
`Starting deployment of CloudFront distribution to the ${ inputs . region } region.`
43
43
) ;
44
44
45
+ if ( AWS ?. config ) {
46
+ AWS . config . update ( {
47
+ maxRetries : parseInt ( process . env . SLS_NEXT_MAX_RETRIES ?? "10" ) ,
48
+ retryDelayOptions : { base : 200 }
49
+ } ) ;
50
+ }
51
+
45
52
const cf = new AWS . CloudFront ( {
46
53
credentials : this . context . credentials . aws ,
47
54
region : inputs . region
Original file line number Diff line number Diff line change @@ -62,6 +62,13 @@ class AwsLambda extends Component {
62
62
`Starting deployment of lambda ${ config . name } to the ${ config . region } region.`
63
63
) ;
64
64
65
+ if ( AWS ?. config ) {
66
+ AWS . config . update ( {
67
+ maxRetries : parseInt ( process . env . SLS_NEXT_MAX_RETRIES ?? "10" ) ,
68
+ retryDelayOptions : { base : 200 }
69
+ } ) ;
70
+ }
71
+
65
72
const lambda = new AwsSdkLambda ( {
66
73
region : config . region ,
67
74
credentials : this . context . credentials . aws
Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ class AwsSqsQueue extends Component {
24
24
const config = mergeDeepRight ( getDefaults ( { defaults } ) , inputs ) ;
25
25
const accountId = await getAccountId ( aws ) ;
26
26
27
+ if ( aws && aws . config ) {
28
+ aws . config . update ( {
29
+ maxRetries : parseInt ( process . env . SLS_NEXT_MAX_RETRIES || "10" ) ,
30
+ retryDelayOptions : { base : 200 }
31
+ } ) ;
32
+ }
33
+
27
34
const arn = getArn ( {
28
35
aws,
29
36
accountId,
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ const HOSTED_ZONE_ID = "Z2FDTNDATAQYW2"; // this is a constant that you can get
9
9
* - Gets AWS SDK clients to use within this Component
10
10
*/
11
11
const getClients = ( credentials , region = "us-east-1" ) => {
12
+ if ( aws && aws . config ) {
13
+ aws . config . update ( {
14
+ maxRetries : parseInt ( process . env . SLS_NEXT_MAX_RETRIES || "10" ) ,
15
+ retryDelayOptions : { base : 200 }
16
+ } ) ;
17
+ }
18
+
12
19
const route53 = new aws . Route53 ( {
13
20
credentials,
14
21
region
You can’t perform that action at this time.
0 commit comments