Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudFormation 500 error #1768

Open
taylorfinnell opened this issue Nov 17, 2019 · 2 comments

Comments

@taylorfinnell
Copy link

@taylorfinnell taylorfinnell commented Nov 17, 2019

Using the latest docker image I get the following during a serverless deploy

localstack_1  | 2019-11-17T22:10:38:ERROR:localstack.services.cloudformation.cloudformation_starter: Unable to parse and create resource "ApiUnderscorecrawlerUnderscoredeleteLambdaVersiong1ugB5NU8yFQUYFhFxm7Oi5nsglZkVqvc5D4clmtJi8": 'FunctionName' Traceback (most recent call last):
localstack_1  |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 173, in parse_and_create_resource
localstack_1  |     return _parse_and_create_resource(logical_id, resource_json, resources_map, region_name)
localstack_1  |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 229, in _parse_and_create_resource
localstack_1  |     resource_json_arns_fixed, resources_map, region_name)
localstack_1  |   File "/opt/code/localstack/.venv/lib/python3.7/site-packages/moto/cloudformation/parsing.py", line 306, in parse_and_create_resource
localstack_1  |     resource_name, resource_json, region_name)
localstack_1  |   File "/opt/code/localstack/.venv/lib/python3.7/site-packages/moto/awslambda/models.py", line 506, in create_from_cloudformation_json
localstack_1  |     function_name = properties['FunctionName']
localstack_1  | KeyError: 'FunctionName'```
@whummer

This comment has been minimized.

Copy link
Collaborator

@whummer whummer commented Nov 18, 2019

Thanks for reporting @taylorfinnell . Can you please provide a minimal example (serverless config) to reproduce this issue? Thanks

@taylorfinnell

This comment has been minimized.

Copy link
Author

@taylorfinnell taylorfinnell commented Nov 18, 2019

I will try to get a minimal example. In the mean time, I noticed that the function name in the error is 92 characters. According to the AWS docs I think the limit might be 64 characters.

The name of the Lambda function, up to 64 characters in length

If I manually set the function name (and disable versioning) the error goes away

EDIT: Sorry didn't mean to close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.