You can also specify a custom ARN directly to the step functions lambda. After that, the outer template reads the correct value from the custom variables. This is the approach Serverless Framework takes when configuring stages for your Serverless project. We went over the concept of environment variables in the chapter on Serverless Environment Variables. e.g. This article is a part of my "100 data engineering tutorials in 100 days" challenge. You can use a custom logical id that is only unique within the stack as opposed to the name that needs to be unique globally. # Then you can reference the export name in StackB, ${ssm(us-west-2):/path/to/service/id}-service, ${ssm(ap-northeast-1):/path/to/service/myParam}-hello, ${ssm:/aws/reference/secretsmanager/secret_ID_in_Secrets_Manager}, ${file(./myCustomFile.yml):globalSchedule}, # Or you can reference a specific property, // We can resolve other variables via `resolveVariable`, 'opt:region, self:provider.region, "us-east-1"', // Resolver may return any JSON value (null, boolean, string, number, array or plain object), ${file(resources/first-cf-resources.yml)}, ${file(resources/second-cf-resources.yml)}, ${strToBool(${ssm:API_GW_DEBUG_ENABLED})}, Properties exported from Javascript files (sync or async), Read String Variable Values as Boolean Values, CloudFormation stack outputs export values. hello-world becomes HelloDashworldLambdaFunction). Likewise, if sls deploy --stage prod is run the config.prod.json file would be found and used. "input": "$body", Parameters can be defined in serverless.yml per stage, as well as in Serverless Dashboard on the service or the instance (stage). You can name it anything you like and don't worry, you can create additional orgs later for free if you need one specially named. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Stage parameters Parameters can be defined for each stage in serverless.yml under the params key: Use the default key to define parameters that apply to all stages by default: Parameters can then be used via the $ {param:XXX} variables: provider: environment: APP_DOMAIN: $ {param:domain} The variable will be resolved based on the current stage. Deploying to stages can be pretty simple but now lets look at how to configure our environment variables so that they work with our various stages. This is particularly useful when deploying services to multiple environments, like a development/staging environment and a production environment. Unfortunately Serverless interprets empty as "default" (== 'dev'). For example: In the above example, the value for myKey in the myBucket S3 bucket will be looked up and used to populate the variable. So you can easily change that prefix for all functions by changing the FUNC_PREFIX env var. Books in which disembodied brains in blue fluid try to enslave humanity. Serverless Framework can now interactively set up new projects: just run "serverless" in an empty directory and follow the prompt. Because you can now do deployments to AWS via the Serverless Framework Dashboard, you no longer need to distribute Access Keys and Secrets to developers so that they can deploy from their local machines. That option can be particularly useful in CI/CD, for example to get a detailed history of the CloudFormation deployment: The error screen has been improved: any failure is now clearly signaled, secondary information is toned down and the error message is printed last, to appear right above the command prompt. In case you need to interpolate a specific stage or service layer variable as the #set( $name = $util.escapeJavaScript($input.json('$.data.attributes.order_id')) ) Oops! --region or -r The region in your stage that you want to invoke your step function. This dependsOn field can be either a string, or an array of strings. This sets the variable to pick the value of self:custom.myEnvironment depending on the current stage defined in custom.myStage. We go in to more detail on how to deploy to multiple AWS accounts using different AWS profiles in the Configure Multiple AWS Profiles chapter. Howeveer, what if we want to deploy multiple stages? Creating a wrapper/frontend script would work (and i've done it before), but for simple setups I prefer to go with the standard way of executing Serverless, since it already has an attractively simple CLI interface. It is also possible to use both v2 and v3 in different projects. It is valid to use the empty string in place of