I have SAM template (post here partially):
AWSTemplateFormatVersion: "2010-09-09"
Transform: "AWS::Serverless-2016-10-31"
Parameters:
StorageStackName:
Type: String
Description: Name of the stack which provisions DynamoDB table and S3 bucket.
Globals:
Function:
Runtime: nodejs12.x
MemorySize: 128
Timeout: 8
CodeUri: .
AutoPublishAlias: latest
Environment:
Variables:
SOURCE_TABLE_NAME:
Fn::ImportValue:
Fn::Sub: "${StorageStackName}-SourceTableName"
Command gives me a notification
sam local start-api --debug --parameter-overrides='StorageStackName=storage-dev'
Unable to resolve property SOURCE_TABLE_NAME: OrderedDict([('Fn::ImportValue', OrderedDict([('Fn::Sub', '${StorageStackName}-SourceTableName')]))]). Leaving as is.
I tried to remove Sub (no luck):
SOURCE_TABLE_NAME:
Fn::ImportValue: "storage-dev-SourceTableName"
The template works on the server, so Fn::ImportValue supported. So my question is Fn::ImportValue supported in local invocation at all?
I am made sure I use same credentials (profile) for local SAM as the one where I have storage-dev
stack. Any way I can recheck it again to make sure even more?