-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area/validatesam validate commandsam validate commandstage/waiting-for-releaseFix has been merged to develop and is waiting for a releaseFix has been merged to develop and is waiting for a releasetype/bug
Description
Description:
Trying to run the command sam validate and get an error that is somewhat hard to understand. May this be related to python version? (Currently 2.7.12) or something else?
Observed result:
2018-05-29 14:05:38 Starting new HTTPS connection (1): sts.amazonaws.com
2018-05-29 14:05:39 Starting new HTTPS connection (1): iam.amazonaws.com
Traceback (most recent call last):
File "/usr/local/bin/sam", line 11, in <module>
sys.exit(cli())
File "/home/kansuler/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/kansuler/.local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/kansuler/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/kansuler/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/kansuler/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/kansuler/.local/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/home/kansuler/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/samcli/commands/validate/validate.py", line 28, in cli
do_cli(ctx, template) # pragma: no cover
File "/usr/local/lib/python2.7/dist-packages/samcli/commands/validate/validate.py", line 42, in do_cli
validator.is_valid()
File "/usr/local/lib/python2.7/dist-packages/samcli/commands/validate/lib/sam_template_validator.py", line 60, in is_valid
parameter_values={})
File "/home/kansuler/.local/lib/python2.7/site-packages/samtranslator/translator/translator.py", line 57, in translate
deployment_preference_collection = DeploymentPreferenceCollection()
File "/home/kansuler/.local/lib/python2.7/site-packages/samtranslator/model/preferences/deployment_preference_collection.py", line 30, in __init__
self.codedeploy_iam_role = self._codedeploy_iam_role()
File "/home/kansuler/.local/lib/python2.7/site-packages/samtranslator/model/preferences/deployment_preference_collection.py", line 89, in _codedeploy_iam_role
ArnGenerator.generate_aws_managed_policy_arn('service-role/AWSCodeDeployRoleForLambda')
File "/home/kansuler/.local/lib/python2.7/site-packages/samtranslator/translator/arn_generator.py", line 22, in generate_aws_managed_policy_arn
return 'arn:{}:iam::aws:policy/{}'.format(ArnGenerator.get_partition_name(),
File "/home/kansuler/.local/lib/python2.7/site-packages/samtranslator/translator/arn_generator.py", line 44, in get_partition_name
region_string = region.lower()
AttributeError: 'NoneType' object has no attribute 'lower'
Expected result:
A proper error message
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Ubuntu 16.04.4 on WSL
Output of sam --version:
SAM CLI, version 0.3.0
Optional Debug logs:
Add --debug flag to command you are running
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/validatesam validate commandsam validate commandstage/waiting-for-releaseFix has been merged to develop and is waiting for a releaseFix has been merged to develop and is waiting for a releasetype/bug