I deployed the lambda named as sample_function
with below template
service: sample_service
frameworkVersion: '3'
provider:
name: aws
runtime: python3.10
memorySize: 1024
timeout: 900
stage: prod
region: us-east-1
iam:
role: arn:aws:iam::accountId:role/RoleName
functions:
sample_function:
handler: dir1/handler.function_name
name: sample_function
description: sample function desc
environment:
VAR_NAME: ""
events:
- schedule: ""
- cloudwatchLog:
""
plugins:
- serverless-pydeps
package:
patterns:
- '!node_modules/**'
- '!package*.json'
- '!serverless.yml'
- '!requirements.txt'
So on next deployment if i want to change the function name from sample_function
to test_function
how to do it ?