@@ -81,6 +81,19 @@ KV Store Options:
81
81
82
82
--kv-overwrite Alias for --overwrite-existing.
83
83
84
+ S3 Storage Options:
85
+ --aws-access-key-id=<key> AWS Access Key ID and Secret Access Key used to
86
+ --aws-secret-access-key=<key> interface with S3.
87
+ If not set, the tool will check:
88
+ 1. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
89
+ environment variables
90
+ 2. The aws credentials file, see below
91
+
92
+ --aws-profile=<profile> Profile within the aws credentials file.
93
+ If not set, the tool will check:
94
+ 1. AWS_PROFILE environment variable
95
+ 2. The default profile, if set
96
+
84
97
Global Options:
85
98
-h, --help Show this help message and exit.
86
99
@@ -109,6 +122,10 @@ export async function action(actionArgs: string[]) {
109
122
{ name : 'local' , type : Boolean } ,
110
123
{ name : 'fastly-api-token' , type : String , } ,
111
124
{ name : 'kv-overwrite' , type : Boolean } ,
125
+
126
+ { name : 'aws-profile' , type : String , } ,
127
+ { name : 'aws-access-key-id' , type : String , } ,
128
+ { name : 'aws-secret-access-key' , type : String , } ,
112
129
] ;
113
130
114
131
const parsed = parseCommandLine ( actionArgs , optionDefinitions ) ;
@@ -135,6 +152,9 @@ export async function action(actionArgs: string[]) {
135
152
local : localMode ,
136
153
[ 'fastly-api-token' ] : fastlyApiToken ,
137
154
[ 'kv-overwrite' ] : _kvOverwrite ,
155
+ [ 'aws-profile' ] : awsProfile ,
156
+ [ 'aws-access-key-id' ] : awsAccessKeyId ,
157
+ [ 'aws-secret-access-key' ] : awsSecretAccessKey ,
138
158
} = parsed . commandLineOptions ;
139
159
140
160
const overwriteExisting = _overwriteExisting ?? _kvOverwrite ;
@@ -210,10 +230,13 @@ export async function action(actionArgs: string[]) {
210
230
// Storage Provider
211
231
let storageProvider : any ;
212
232
try {
213
- storageProvider = loadStorageProviderFromStaticPublishRc ( staticPublisherRc , {
233
+ storageProvider = await loadStorageProviderFromStaticPublishRc ( staticPublisherRc , {
214
234
computeAppDir,
215
235
localMode,
216
236
fastlyApiToken,
237
+ awsProfile,
238
+ awsAccessKeyId,
239
+ awsSecretAccessKey,
217
240
} ) ;
218
241
} catch ( err : unknown ) {
219
242
console . error ( `❌ Could not instantiate store provider` ) ;
0 commit comments