You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to deploy one function, I notice the customized function name will not be applied and it will have the prefix ${serverless.service.service}-${awsProvider.getStage()} always.
constfuncPrefix=`${serverless.service.service}-${awsProvider.getStage()}`;// check which custom resource should be usedif(resourceName==='s3'){functionName=awsProvider.naming.getCustomResourceS3HandlerFunctionName();Handler='s3/handler.handler';customResourceFunctionLogicalId=awsProvider.naming.getCustomResourceS3HandlerFunctionLogicalId();}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I try to deploy one function, I notice the customized function name will not be applied and it will have the prefix
${serverless.service.service}-${awsProvider.getStage()}
always.The following is the partial script in my side
After checking the source code, I found it has the different logic about getting function between
existing:false
andexisting:true
for
existing:true
, it is https://github.com/serverless/serverless/blob/main/lib/plugins/aws/custom-resources/index.js#L30-L43but for
existing:false
, it is https://github.com/serverless/serverless/blob/main/lib/plugins/aws/package/compile/events/s3/index.js#L234-L240That's the reason it cannot apply to the customized function name. Does there have any specific reason for that?
Beta Was this translation helpful? Give feedback.
All reactions