File tree Expand file tree Collapse file tree 6 files changed +775
-327
lines changed Expand file tree Collapse file tree 6 files changed +775
-327
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ const domain = config.app.url
1717const appName = config . app . name ?. toLowerCase ( ) ?? 'stacks'
1818const slug = slugify ( appName )
1919const name = `${ slug } -cloud`
20- const account = env . AWS_ACCOUNT_ID
20+ const account = env . AWS_ACCOUNT_ID || undefined
2121// const region = env.AWS_DEFAULT_REGION
22- const region = 'us-east-1' // currently, us-east-1 is the only fully-supported region
22+ const region = env . AWS_REGION || 'us-east-1' // currently, us-east-1 is the only fully-supported region
2323let timestamp
2424
2525if ( ! appKey ) {
@@ -34,8 +34,10 @@ if (parts && parts.length < 2) {
3434 )
3535}
3636
37- if ( ! account || ! region )
38- throw new Error ( 'Stacks is missing your accountId or region. Please ensure it is set in your .env file' )
37+ // AWS Account ID is optional - CDK will use current credentials if not specified
38+ if ( ! region ) {
39+ throw new Error ( 'Stacks is missing AWS region. Please ensure AWS_REGION is set in your .env file' )
40+ }
3941
4042if ( ! domain )
4143 throw new Error ( 'Missing app.url in config.' )
You can’t perform that action at this time.
0 commit comments