Custom name for default lambda execution role and API gateway

By default, if we deploy a “test-app”, we will be having the default lambda execution role as "test-app-dev-us-east-1-lambdaRole"

service: test-app stage: dev region: us-east-1 stack: test-app-dev

How can I set the lambda default execution role into just “test-app” rather than “stack_name-stage-location”?
Same with the API gateway. How can I change the name of API gateway into just “stack_name” rather than having “stack_name-stage”?

1 Like