@@ -81,6 +81,19 @@ KV Store Options:
8181
8282 --kv-overwrite Alias for --overwrite-existing.
8383
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+
8497Global Options:
8598 -h, --help Show this help message and exit.
8699
@@ -109,6 +122,10 @@ export async function action(actionArgs: string[]) {
109122 { name : 'local' , type : Boolean } ,
110123 { name : 'fastly-api-token' , type : String , } ,
111124 { 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 , } ,
112129 ] ;
113130
114131 const parsed = parseCommandLine ( actionArgs , optionDefinitions ) ;
@@ -135,6 +152,9 @@ export async function action(actionArgs: string[]) {
135152 local : localMode ,
136153 [ 'fastly-api-token' ] : fastlyApiToken ,
137154 [ 'kv-overwrite' ] : _kvOverwrite ,
155+ [ 'aws-profile' ] : awsProfile ,
156+ [ 'aws-access-key-id' ] : awsAccessKeyId ,
157+ [ 'aws-secret-access-key' ] : awsSecretAccessKey ,
138158 } = parsed . commandLineOptions ;
139159
140160 const overwriteExisting = _overwriteExisting ?? _kvOverwrite ;
@@ -210,10 +230,13 @@ export async function action(actionArgs: string[]) {
210230 // Storage Provider
211231 let storageProvider : any ;
212232 try {
213- storageProvider = loadStorageProviderFromStaticPublishRc ( staticPublisherRc , {
233+ storageProvider = await loadStorageProviderFromStaticPublishRc ( staticPublisherRc , {
214234 computeAppDir,
215235 localMode,
216236 fastlyApiToken,
237+ awsProfile,
238+ awsAccessKeyId,
239+ awsSecretAccessKey,
217240 } ) ;
218241 } catch ( err : unknown ) {
219242 console . error ( `❌ Could not instantiate store provider` ) ;
0 commit comments