add serverless-plugin-split-stacks and update serverless configuration; refactor host function definitions and improve updateHostProfile handler
This commit is contained in:
@@ -16,6 +16,11 @@ provider:
|
||||
runtime: nodejs22.x
|
||||
region: ap-south-1
|
||||
stage: ${opt:stage, 'dev'}
|
||||
deploymentBucket:
|
||||
# use a fixed bucket name to prevent Serverless from creating/quashing a resource
|
||||
name: serverless-framework-deployments-ap-south-1-50264b8e-d2b9
|
||||
# optionally uncomment below to enable serverless to create if missing
|
||||
# serverSideEncryption: AES256
|
||||
versionFunctions: false
|
||||
memorySize: 512
|
||||
# Apply Prisma layer to all functions
|
||||
@@ -73,10 +78,6 @@ provider:
|
||||
- 'arn:aws:s3:::${env:S3_BUCKET_NAME}'
|
||||
- 'arn:aws:s3:::${env:S3_BUCKET_NAME}/*'
|
||||
|
||||
custom:
|
||||
serverless-offline:
|
||||
reloadHandler: true
|
||||
|
||||
build:
|
||||
esbuild:
|
||||
bundle: true
|
||||
@@ -149,4 +150,20 @@ functions:
|
||||
- ${file(./serverless/functions/user.yml)}
|
||||
|
||||
plugins:
|
||||
- serverless-offline
|
||||
- serverless-offline
|
||||
- serverless-plugin-split-stacks
|
||||
|
||||
custom:
|
||||
serverless-offline:
|
||||
reloadHandler: true
|
||||
|
||||
# split-stacks configuration to avoid CloudFormation resource limit
|
||||
splitStacks:
|
||||
perType: true
|
||||
# You can fine‑tune to exclude resource types that don't need splitting
|
||||
exclude:
|
||||
- AWS::Lambda::Permission
|
||||
- AWS::Logs::LogGroup
|
||||
- AWS::IAM::Role
|
||||
- AWS::IAM::Policy # keep deployment bucket in main stack to avoid dependency errors
|
||||
- AWS::S3::Bucket
|
||||
Reference in New Issue
Block a user