AWS SAM YAML template - Unknown Tag !Ref
When I try to deploy my AWS SAM YAML file, it fails saying the !Ref is an unknown tag.
Any ideas to get around this?
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
MySimpleFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs4.3
CodeUri: s3://<bucket>/MyCode.zip
Events:
MyUploadEvent:
Type: S3
Properties:
Id: !Ref Bucket
Events: Create
Bucket:
Type: AWS::S3::Bucket
yaml amazon-cloudformation serverless aws-serverless aws-sam
add a comment |
When I try to deploy my AWS SAM YAML file, it fails saying the !Ref is an unknown tag.
Any ideas to get around this?
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
MySimpleFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs4.3
CodeUri: s3://<bucket>/MyCode.zip
Events:
MyUploadEvent:
Type: S3
Properties:
Id: !Ref Bucket
Events: Create
Bucket:
Type: AWS::S3::Bucket
yaml amazon-cloudformation serverless aws-serverless aws-sam
I think the ! notation is still not supported. Try just REF
– Zoran Pandovski
Nov 25 '18 at 18:05
Using !Ref in a YAML AWS SAM is definitely posssible.
– Dunedan
Nov 25 '18 at 18:14
@EdsonF: What's generating the error message? What's the IDE you're using?
– Dunedan
Nov 25 '18 at 18:15
@Dunedan Visual Studio 2017. And I've also tried Visual Studio Code, to no availe
– EdsonF
Nov 25 '18 at 18:17
Does it fail when you runsls deploy
?
– tkwargs
Nov 25 '18 at 22:19
add a comment |
When I try to deploy my AWS SAM YAML file, it fails saying the !Ref is an unknown tag.
Any ideas to get around this?
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
MySimpleFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs4.3
CodeUri: s3://<bucket>/MyCode.zip
Events:
MyUploadEvent:
Type: S3
Properties:
Id: !Ref Bucket
Events: Create
Bucket:
Type: AWS::S3::Bucket
yaml amazon-cloudformation serverless aws-serverless aws-sam
When I try to deploy my AWS SAM YAML file, it fails saying the !Ref is an unknown tag.
Any ideas to get around this?
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
MySimpleFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs4.3
CodeUri: s3://<bucket>/MyCode.zip
Events:
MyUploadEvent:
Type: S3
Properties:
Id: !Ref Bucket
Events: Create
Bucket:
Type: AWS::S3::Bucket
yaml amazon-cloudformation serverless aws-serverless aws-sam
yaml amazon-cloudformation serverless aws-serverless aws-sam
edited Nov 26 '18 at 7:43
Dunedan
2,20151522
2,20151522
asked Nov 25 '18 at 18:01
EdsonFEdsonF
1,54721929
1,54721929
I think the ! notation is still not supported. Try just REF
– Zoran Pandovski
Nov 25 '18 at 18:05
Using !Ref in a YAML AWS SAM is definitely posssible.
– Dunedan
Nov 25 '18 at 18:14
@EdsonF: What's generating the error message? What's the IDE you're using?
– Dunedan
Nov 25 '18 at 18:15
@Dunedan Visual Studio 2017. And I've also tried Visual Studio Code, to no availe
– EdsonF
Nov 25 '18 at 18:17
Does it fail when you runsls deploy
?
– tkwargs
Nov 25 '18 at 22:19
add a comment |
I think the ! notation is still not supported. Try just REF
– Zoran Pandovski
Nov 25 '18 at 18:05
Using !Ref in a YAML AWS SAM is definitely posssible.
– Dunedan
Nov 25 '18 at 18:14
@EdsonF: What's generating the error message? What's the IDE you're using?
– Dunedan
Nov 25 '18 at 18:15
@Dunedan Visual Studio 2017. And I've also tried Visual Studio Code, to no availe
– EdsonF
Nov 25 '18 at 18:17
Does it fail when you runsls deploy
?
– tkwargs
Nov 25 '18 at 22:19
I think the ! notation is still not supported. Try just REF
– Zoran Pandovski
Nov 25 '18 at 18:05
I think the ! notation is still not supported. Try just REF
– Zoran Pandovski
Nov 25 '18 at 18:05
Using !Ref in a YAML AWS SAM is definitely posssible.
– Dunedan
Nov 25 '18 at 18:14
Using !Ref in a YAML AWS SAM is definitely posssible.
– Dunedan
Nov 25 '18 at 18:14
@EdsonF: What's generating the error message? What's the IDE you're using?
– Dunedan
Nov 25 '18 at 18:15
@EdsonF: What's generating the error message? What's the IDE you're using?
– Dunedan
Nov 25 '18 at 18:15
@Dunedan Visual Studio 2017. And I've also tried Visual Studio Code, to no availe
– EdsonF
Nov 25 '18 at 18:17
@Dunedan Visual Studio 2017. And I've also tried Visual Studio Code, to no availe
– EdsonF
Nov 25 '18 at 18:17
Does it fail when you run
sls deploy
?– tkwargs
Nov 25 '18 at 22:19
Does it fail when you run
sls deploy
?– tkwargs
Nov 25 '18 at 22:19
add a comment |
2 Answers
2
active
oldest
votes
This error message is almost certainly a false-positive from the YAML parser your IDE is using. To assess the correctness of the AWS SAM template, you should use cfn-python-lint instead, which comes with plugins for most major IDEs (unfortunately not for Visual Studio, but for Visual Studio Code).
add a comment |
You can use the Full name. Just remove the !, wrap it with quote notation and the whole expression with {}:
{"Ref": Bucket}
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53470329%2faws-sam-yaml-template-unknown-tag-ref%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This error message is almost certainly a false-positive from the YAML parser your IDE is using. To assess the correctness of the AWS SAM template, you should use cfn-python-lint instead, which comes with plugins for most major IDEs (unfortunately not for Visual Studio, but for Visual Studio Code).
add a comment |
This error message is almost certainly a false-positive from the YAML parser your IDE is using. To assess the correctness of the AWS SAM template, you should use cfn-python-lint instead, which comes with plugins for most major IDEs (unfortunately not for Visual Studio, but for Visual Studio Code).
add a comment |
This error message is almost certainly a false-positive from the YAML parser your IDE is using. To assess the correctness of the AWS SAM template, you should use cfn-python-lint instead, which comes with plugins for most major IDEs (unfortunately not for Visual Studio, but for Visual Studio Code).
This error message is almost certainly a false-positive from the YAML parser your IDE is using. To assess the correctness of the AWS SAM template, you should use cfn-python-lint instead, which comes with plugins for most major IDEs (unfortunately not for Visual Studio, but for Visual Studio Code).
answered Nov 25 '18 at 18:19
DunedanDunedan
2,20151522
2,20151522
add a comment |
add a comment |
You can use the Full name. Just remove the !, wrap it with quote notation and the whole expression with {}:
{"Ref": Bucket}
add a comment |
You can use the Full name. Just remove the !, wrap it with quote notation and the whole expression with {}:
{"Ref": Bucket}
add a comment |
You can use the Full name. Just remove the !, wrap it with quote notation and the whole expression with {}:
{"Ref": Bucket}
You can use the Full name. Just remove the !, wrap it with quote notation and the whole expression with {}:
{"Ref": Bucket}
answered Nov 27 '18 at 10:53
Kostas TzouvalidisKostas Tzouvalidis
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53470329%2faws-sam-yaml-template-unknown-tag-ref%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think the ! notation is still not supported. Try just REF
– Zoran Pandovski
Nov 25 '18 at 18:05
Using !Ref in a YAML AWS SAM is definitely posssible.
– Dunedan
Nov 25 '18 at 18:14
@EdsonF: What's generating the error message? What's the IDE you're using?
– Dunedan
Nov 25 '18 at 18:15
@Dunedan Visual Studio 2017. And I've also tried Visual Studio Code, to no availe
– EdsonF
Nov 25 '18 at 18:17
Does it fail when you run
sls deploy
?– tkwargs
Nov 25 '18 at 22:19