Issue
I am running SAM CLI, version 1.36.0 and when I try to input the architectures prompted by Cookiecutter I get an Error: Unable to decode to JSON. error. And this might not be intuitive for a first time user
sam init --location cookiecutter-aws-sam-eventbridge-hello-java-gradle
project_name [Your EventBridge Starter app]: x
runtime [java11]:
architectures [default]: arm64
Error: Unable to decode to JSON.
Work around
If I set the input to {"value":["arm64"]} for architectures then this works.
sam init --location cookiecutter-aws-sam-eventbridge-hello-java-gradle
project_name [Your EventBridge Starter app]: x
runtime [java11]:
architectures [default]: {"value":["arm64"]}
Or if I pass in architecture in the cli and not enter anything in architectures:
sam init --location java11/cookiecutter-aws-sam-eventbridge-hello-java-gradle --architecture arm64
Possible Solution
- Change the
architectures in cookiecutter.json to be a simple string value like runtime, this would mean change all of the templates and CLI
Issue
I am running
SAM CLI, version 1.36.0and when I try to input thearchitecturesprompted by Cookiecutter I get anError: Unable to decode to JSON.error. And this might not be intuitive for a first time userWork around
If I set the input to
{"value":["arm64"]}forarchitecturesthen this works.Or if I pass in
architecturein the cli and not enter anything inarchitectures:Possible Solution
architecturesincookiecutter.jsonto be a simple string value likeruntime, this would mean change all of the templates and CLI