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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
sam-app
Sample SAM Template for sam-app
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 3
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
Handler: app.lambda_handler
Runtime: nodejs8.10
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
Variables:
STACK_NAME: !Ref AWS::StackName
Events:
HelloWorld:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /hello
Method: get
Yes, this is a breaking change between the two versions. After v0.3.0 we stopped faking default AWS parameter values. Instead you can directly override the environment variable by passing value to sam local start-api --env-vars command.
Description:
In v0.2.11 when running with
sam local start-api
,!Ref AWS::StackName
returned 'goformation-stack' - I believe defined in https://github.com/awslabs/aws-sam-cli/blob/release/v0.2.11/vendor/github.com/awslabs/goformation/intrinsics/ref.go. In v0.3.0, it seems like nothing is returned.Are these intrinsics still present in v0.3.0?
Steps to reproduce the issue:
process.env.STACK_NAME
sam local start-api
template.yaml
app.js
Observed result:
v0.2.11: log contains stack name: goformation-stack
v0.3.0: log contains stack name:
Expected result:
Both versions should output a stack name.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Output of
sam --version
:SAM CLI, version 0.3.0
Optional Debug logs:
Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: