Skip to content

Commit dd7f333

Browse files
committed
chore: wip
1 parent c134177 commit dd7f333

File tree

6 files changed

+775
-327
lines changed

6 files changed

+775
-327
lines changed

storage/framework/cloud/deploy.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const domain = config.app.url
1717
const appName = config.app.name?.toLowerCase() ?? 'stacks'
1818
const slug = slugify(appName)
1919
const 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
2323
let timestamp
2424

2525
if (!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

4042
if (!domain)
4143
throw new Error('Missing app.url in config.')

0 commit comments

Comments
 (0)