Hi,
Trying to deploy onto localstack but getting this exception from serverless, it is kind of weird since the same stack works properly when running sls deploy
on AWS.
Localstack: 0.11.4
serverless: 1.81.1
serverless-localstack: 0.4.27
Below is the serverless.yml
:
service:
name: 'jizo-accts'
frameworkVersion: '>=1.72.0'
plugins:
- serverless-webpack
- serverless-dynamodb-local
- serverless-offline-sqs
- serverless-offline
- serverless-localstack
custom:
webpack:
webpackConfig: './webpack.config.js'
includeModules: true
serverless-offline-sqs:
autoCreate: false
apiVersion: '2012-11-05'
endpoint: http://0.0.0.0:4576
region: us-east-1
accessKeyId: root
secretAccessKey: root
skipCacheInvalidation: false
serverless-offline:
stage:
-local
lambdaPort: 4574
dynamodb:
stages:
- local
start:
port: 4569
inMemory: true
heapInitial: 128m
heapMax: 1g
migrate: true
localstack:
docker:
sudo: false
debug: true
endpoints:
S3: http://localhost:4572
DynamoDB: http://localhost:4569
CloudFormation: http://localhost:4581
Elasticsearch: http://localhost:4571
ES: http://localhost:4578
SNS: http://localhost:4575
SQS: http://localhost:4576
Lambda: http://localhost:4574
Kinesis: http://localhost:4568
host: "http://localhost"
lambda:
mountCode: false
stages:
- dev
provider:
name: 'aws'
apiGateway:
minimumCompressionSize: 1024
environment:
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1'
ML_EXT_LOOPBACK: 'NO'
ML_EXT_DEBUG: 'YES'
ML_EXT_SYSENV: ${opt:stage}
ML_CLOUD_REGION: ${opt:region}
runtime: 'nodejs12.x'
iamRoleStatements:
- Effect: 'Allow'
Action:
- 'sqs:ReceiveMessage'
- 'sqs:DeleteMessage'
Resource:
- "arn:aws:sqs:::${self:service}-${opt:stage}-RescopeQueue"
- "arn:aws:sqs:::${self:service}-${opt:stage}-UncopeQueue"
- Effect: 'Allow'
Action:
- 'sqs:SendMessage'
Resource: '*'
- Effect: 'Allow'
Action:
- 'dynamodb:DeleteItem'
- 'dynamodb:PutItem'
- 'dynamodb:Query'
- 'dynamodb:Scan'
Resource:
- "arn:aws:dynamodb:::jizo.${opt:stage}.accountsTable"
- "arn:aws:dynamodb:::jizo.${opt:stage}.identitiesTable"
- "arn:aws:dynamodb:::jizo.${opt:stage}.acctsAuditTrialTable"
- "arn:aws:dynamodb:::jizo.${opt:stage}.usersTable"
- Effect: 'Allow'
Action:
- 's3:GetObject'
Resource:
- "arn:aws:s3:::${self:service}.${opt:stage}.identity"
- Effect: 'Allow'
Action:
- 'sns:Public'
Resource:
- "arn:aws:sns:::${self:service}-${opt:stage}-registerAccount"
- "arn:aws:sns:::${self:service}-${opt:stage}-unregisterAccount"
- Effect: 'Allow'
Action:
- 'sns:Subscribe'
Resource: '*'
functions:
rescope:
handler: src/sqs.rescope
description: "To handle rescoping account via the invoicing service"
events:
- sqs:
arn:
Fn::GetAtt:
- RescopeQueue
- Arn
unscope:
handler: src/sqs.unscope
description: "To handle unscoping account via the invoicing service"
events:
- sqs:
arn:
Fn::GetAtt:
- UnscopeQueue
- Arn
userGet:
handler: src/lambda.userGet
description: 'provide sync call to get user data'
identify:
handler: src/s3.identify
description: "Trigger identity creation and validation when receiving files upload to bucket"
events:
- s3:
bucket: "${self:service}.${opt:stage}.identity"
event: s3:ObjectCreate:*
router:
handler: src/http.router
description: 'primary REST related handlers for this service'
events:
- http: 'GET {proxy+}'
- http: 'POST {proxy+}'
- http: 'PATCH {proxy+}'
- http: 'PUT {proxy+}'
- http: 'DELETE {proxy+}'
- http: 'OPTIONS {proxy+}'
- http: 'HEAD {proxy+}'
resources:
Resources:
# s3 configuration
identityBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: "${self:service}.${opt:stage}.identity"
# dynamodb configuration
accountsTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: "jizo.${opt:stage}.accountsTable"
AttributeDefinitions:
- AttributeName: object_id
AttributeType: S
KeySchema:
- AttributeName: object_id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
identitiesTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: "jizo.${opt:stage}.identitiesTable"
AttributeDefinitions:
- AttributeName: object_id
AttributeType: S
KeySchema:
- AttributeName: object_id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
acctTrailTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: "jizo.${opt:stage}.acctsAuditTrialTable"
AttributeDefinitions:
- AttributeName: object_id
AttributeType: S
KeySchema:
- AttributeName: object_id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
usersTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: "jizo.${opt:stage}.usersTable"
AttributeDefinitions:
- AttributeName: object_id
AttributeType: S
KeySchema:
- AttributeName: object_id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
# incoming SQS configuration
RescopeQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: "${self:service}-${opt:stage}-RescopeQueue"
VisibilityTimeout: 1080
MessageRetentionPeriod: 2160
RedrivePolicy:
deadLetterTargetArn:
Fn::GetAtt:
- RescopeBackupQueue
- Arn
maxReceiveCount: 3
RescopeBackupQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: "${self:service}-${opt:stage}-RescopeBackupQueue"
UnscopeQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: "${self:service}-${opt:stage}-UnscopeQueue"
VisibilityTimeout: 1080
MessageRetentionPeriod: 2160
RedrivePolicy:
deadLetterTargetArn:
Fn::GetAtt:
- UnscopeBackupQueue
- Arn
maxReceiveCount: 3
UnscopeBackupQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: "${self:service}-${opt:stage}-UnscopeBackupQueue"
# SNS Definitions
registerAccountTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: "${self:service}-${opt:stage}-registerAccount"
unregisterAccountTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: "${self:service}-${opt:stage}-unregisterAccount"
The setup for localstack
is as follow:
version: '2.1'
services:
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
image: localstack/localstack:latest
ports:
- "4000-4597:4000-4597"
environment:
- SERVICES=${SERVICES- }
# - SERVICES=sts,iam,cloudformation,s3,lambda,sqs,sns,ses,dynamodb,apigateway
- DEBUG=1
- DEFAULT_REGION=ap-southeast-1
- DATA_DIR=${DATA_DIR- }
- LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR- docker-reuse}
- KINESIS_ERROR_PROBABILITY=${KINESIS_ERROR_PROBABILITY- }
- DOCKER_HOST=unix:///var/run/docker.sock
- HOST_TMP_FOLDER=${TMPDIR}
- AWS_EXECUTION_ENV=true
volumes:
- "/tmp/localstack:/tmp/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
The output from serverless was like this...
Serverless: config.options_stage: dev
Serverless: serverless.service.custom.stage: undefined
Serverless: serverless.service.provider.stage: dev
Serverless: config.stage: dev
Serverless: Using serverless-localstack
Serverless: Reconfiguring service apigateway to use http://localhost:4566
Serverless: Reconfiguring service cloudformation to use http://localhost:4566
Serverless: Reconfiguring service cloudwatch to use http://localhost:4566
Serverless: Reconfiguring service lambda to use http://localhost:4566
Serverless: Reconfiguring service dynamodb to use http://localhost:4566
Serverless: Reconfiguring service kinesis to use http://localhost:4566
Serverless: Reconfiguring service route53 to use http://localhost:4566
Serverless: Reconfiguring service firehose to use http://localhost:4566
Serverless: Reconfiguring service stepfunctions to use http://localhost:4566
Serverless: Reconfiguring service es to use http://localhost:4566
Serverless: Reconfiguring service s3 to use http://localhost:4566
Serverless: Reconfiguring service ses to use http://localhost:4566
Serverless: Reconfiguring service sns to use http://localhost:4566
Serverless: Reconfiguring service sqs to use http://localhost:4566
Serverless: Reconfiguring service sts to use http://localhost:4566
Serverless: Reconfiguring service iam to use http://localhost:4566
Serverless: Reconfiguring service ssm to use http://localhost:4566
Serverless: Reconfiguring service rds to use http://localhost:4566
Serverless: Reconfiguring service ec2 to use http://localhost:4566
Serverless: Reconfiguring service elasticache to use http://localhost:4566
Serverless: Reconfiguring service kms to use http://localhost:4566
Serverless: Reconfiguring service secretsmanager to use http://localhost:4566
Serverless: Reconfiguring service logs to use http://localhost:4566
Serverless: Reconfiguring service cloudwatchlogs to use http://localhost:4566
Serverless: Reconfiguring service iot to use http://localhost:4566
Serverless: Reconfiguring service cognito-idp to use http://localhost:4566
Serverless: Reconfiguring service cognito-identity to use http://localhost:4566
Serverless: Reconfiguring service ecs to use http://localhost:4566
Serverless: Reconfiguring service eks to use http://localhost:4566
Serverless: Reconfiguring service xray to use http://localhost:4566
Serverless: Reconfiguring service appsync to use http://localhost:4566
Serverless: Reconfiguring service cloudfront to use http://localhost:4566
Serverless: Reconfiguring service athena to use http://localhost:4566
Serverless: Reconfiguring service S3 to use http://localhost:4572
Serverless: Reconfiguring service DynamoDB to use http://localhost:4569
Serverless: Reconfiguring service CloudFormation to use http://localhost:4581
Serverless: Reconfiguring service Elasticsearch to use http://localhost:4571
Serverless: Reconfiguring service ES to use http://localhost:4578
Serverless: Reconfiguring service SNS to use http://localhost:4575
Serverless: Reconfiguring service SQS to use http://localhost:4576
Serverless: Reconfiguring service Lambda to use http://localhost:4574
Serverless: Reconfiguring service Kinesis to use http://localhost:4568
Serverless: Warning: Unable to find plugin named: TypeScriptPlugin
Serverless: Configuration warning:
Serverless: at 'functions.identify.events[0]': unrecognized property 'bucket'
Serverless: at 'functions.identify.events[0]': unrecognized property 'event'
Serverless:
Serverless: If you prefer to not continue ensure "configValidationMode: error" in your config
Serverless: If errors are influenced by an external plugin, enquiry at plugin repository so schema extensions are added (https://www.serverless.com/framework/docs/providers/aws/guide/plugins#extending-validation-schema)
Serverless: If errors seem invalid, please report at https://github.com/serverless/serverless/issues/new?template=bug_report.md
Serverless: If you find this functionality problematic, you may turn it off with "configValidationMode: off" setting
Serverless:
Serverless: config.options_stage: dev
Serverless: serverless.service.custom.stage: undefined
Serverless: serverless.service.provider.stage: dev
Serverless: config.stage: dev
Serverless: config.options_stage: dev
Serverless: serverless.service.custom.stage: undefined
Serverless: serverless.service.provider.stage: dev
Serverless: config.stage: dev
Serverless: Bundling with Webpack...
Time: 1056ms
Built at: 09/04/2020 01:11:16
Asset Size Chunks Chunk Names
src/http.js 19.6 KiB 0 [emitted] src/http
src/http.js.map 80.2 KiB 0 [emitted] [dev] src/http
src/lambda.js 13.8 KiB 1 [emitted] src/lambda
src/lambda.js.map 47.4 KiB 1 [emitted] [dev] src/lambda
src/s3.js 8.87 KiB 2 [emitted] src/s3
src/s3.js.map 41.9 KiB 2 [emitted] [dev] src/s3
src/sqs.js 13.8 KiB 3 [emitted] src/sqs
src/sqs.js.map 48 KiB 3 [emitted] [dev] src/sqs
Entrypoint src/sqs = src/sqs.js src/sqs.js.map
Entrypoint src/lambda = src/lambda.js src/lambda.js.map
Entrypoint src/s3 = src/s3.js src/s3.js.map
Entrypoint src/http = src/http.js src/http.js.map
[0] external "@leungas/aws-orm" 42 bytes {0} {1} {2} {3} [built]
[1] external "@leungas/lambda" 42 bytes {0} {1} {3} [built]
[2] ./src/index.ts + 11 modules 13.5 KiB {0} {1} {2} {3} [built]
| ./src/index.ts 55 bytes [built]
| ./src/models/index.ts 151 bytes [built]
| ./src/factories/index.ts 71 bytes [built]
| ./src/models/user.ts 3 KiB [built]
| ./src/models/account.ts 4.03 KiB [built]
| ./src/models/account.owner.ts 474 bytes [built]
| ./src/models/identity.ts 935 bytes [built]
| ./src/models/identity.individual.ts 2.2 KiB [built]
| ./src/factories/account.factory.ts 485 bytes [built]
| ./src/factories/identity.factory.ts 1.78 KiB [built]
| ./src/exceptions/serial.invalid-location.ts 168 bytes [built]
| ./src/exceptions/serial.invalid-format.ts 181 bytes [built]
[3] ./src/configuration/infrastructure/queues/dev.json 313 bytes {0} {1} {3} [built]
[7] ./src/configuration/index.ts 125 bytes {0} {1} {3} [built]
[8] ./src/configuration/dev.ts 579 bytes {0} {1} {3} [built]
[9] ./src/configuration/prod.ts 581 bytes {0} {1} {3} [built]
[12] ./src/configuration/local.ts 578 bytes {0} {1} {3} [built]
[13] ./src/middlewares/exception.handler.ts 1.15 KiB {0} {1} [built]
[14] external "aws-sdk" 42 bytes {2} [built]
[15] external "lambda-api" 42 bytes {0} [built]
[16] ./src/http.ts + 17 modules 15.6 KiB {0} [built]
| ./src/http.ts 3.03 KiB [built]
| ./src/middlewares/application.loader.ts 288 bytes [built]
| ./src/controllers/http/account.create.ts 2.16 KiB [built]
| ./src/middlewares/account.admin.ts 652 bytes [built]
| ./src/controllers/http/account.delete.ts 859 bytes [built]
| ./src/controllers/http/account.disable.ts 768 bytes [built]
| ./src/controllers/http/account.enable.ts 895 bytes [built]
| ./src/controllers/http/account.settings.get.ts 540 bytes [built]
| ./src/controllers/http/account.settings.set.ts 623 bytes [built]
| ./src/controllers/http/user.create.ts 638 bytes [built]
| ./src/controllers/http/user.delete.ts 656 bytes [built]
| ./src/controllers/http/user.disable.ts 1.29 KiB [built]
| ./src/controllers/http/user.enable.ts 1.25 KiB [built]
| ./src/controllers/http/user.preference.get.ts 468 bytes [built]
| ./src/controllers/http/user.preference.set.ts 594 bytes [built]
| + 3 hidden modules
[17] ./src/sqs.ts + 2 modules 2.55 KiB {3} [built]
| ./src/sqs.ts 250 bytes [built]
| ./src/controllers/sqs/account.rescope.ts 1.15 KiB [built]
| ./src/controllers/sqs/account.unscope.ts 1.15 KiB [built]
[18] ./src/s3.ts + 2 modules 2.4 KiB {2} [built]
| ./src/s3.ts 128 bytes [built]
| ./src/controllers/s3/account.identify.ts 2.1 KiB [built]
| ./src/exceptions/document.bad-cogn.ts 161 bytes [built]
[19] ./src/lambda.ts + 1 modules 1.32 KiB {1} [built]
| ./src/lambda.ts 107 bytes [built]
| ./src/controllers/lambda/user.get.ts 1.2 KiB [built]
+ 5 hidden modules
Serverless: WARNING: Could not determine version of module lambda-api
Serverless: WARNING: Could not determine version of module aws-sdk
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: @leungas/aws-orm@git+https://djonno-admin:[email protected]/djonno-backend/jizoo-core.git, @leungas/lambda@git+https://djonno-admin:[email protected]/djonno-backend/lambda-support.git, lambda-api, aws-sdk
Serverless: WARNING: Could not determine version of module lambda-api
Serverless: WARNING: Could not determine version of module aws-sdk
Serverless: Packaging service...
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
.
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service jizo-accts.zip file to S3 (27.96 MB)...
Serverless: Validating template...
Serverless: Skipping template validation: Unsupported in Localstack
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
.
Serverless: Stack update finished...
Type Error ---------------------------------------------
TypeError: message.startsWith is not a function
at /Users/leungas/.nvm/versions/node/v12.18.2/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:506:23
at processTicksAndRejections (internal/process/task_queues.js:97:5)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 12.18.2
Framework Version: 1.81.1
Plugin Version: 3.8.2
SDK Version: 2.3.1
Components Version: 2.34.9
The error returned at localstack was started with this:
{code}
localstack_main | 2020-09-03T17:13:48:ERROR:localstack.services.cloudformation.cloudformation_starter: Unable to parse and create resource "UserGetLambdaVersionPqf01E84DnieuGEURTZ1hUcOiB4rTEKYaCX8RpZiBYs": 'FunctionName' Traceback (most recent call last):
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 268, in parse_and_create_resource
localstack_main | return _parse_and_create_resource(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 340, in _parse_and_create_resource
localstack_main | raise moto_create_error
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 322, in _parse_and_create_resource
localstack_main | resource = parse_and_create_resource_orig(
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/cloudformation/parsing.py", line 297, in parse_and_create_resource
localstack_main | resource = resource_class.create_from_cloudformation_json(
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/awslambda/models.py", line 709, in create_from_cloudformation_json
localstack_main | function_name = properties["FunctionName"]
localstack_main | KeyError: 'FunctionName'
localstack_main |
localstack_main | 2020-09-03T17:13:48:DEBUG:localstack.services.cloudformation.cloudformation_listener: Error response for CloudFormation action "DescribeStackResource" (500) POST /: b'\n<title>500 Internal Server Error</title>\n
Internal Server Error
\n
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
\n'
localstack_main | 2020-09-03T17:13:48:WARNING:localstack.utils.cloudformation.template_deployer: Unable to get details for resource "ApiGatewayRestApi" in CloudFormation stack "jizo-accts-dev": Unable to parse response (syntax error: line 1, column 54), invalid XML received. Further retries may succeed:
localstack_main | b'\n<title>500 Internal Server Error</title>\n
Internal Server Error
\n
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
\n'
localstack_main | 2020-09-03T17:13:48:ERROR:localstack.services.cloudformation.cloudformation_starter: Unable to parse and create resource "ApiGatewayResourceProxyVar": None Traceback (most recent call last):
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 268, in parse_and_create_resource
localstack_main | return _parse_and_create_resource(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 404, in _parse_and_create_resource
localstack_main | update_resource_id(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 469, in update_resource_id
localstack_main | backend.apis[api_id].resources.pop(resource.id, None)
localstack_main | KeyError: None
localstack_main |
localstack_main | 2020-09-03T17:13:48:ERROR:localstack.services.cloudformation.cloudformation_starter: Unable to parse and create resource "ApiGatewayMethodProxyVarGet": None Traceback (most recent call last):
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 268, in parse_and_create_resource
localstack_main | return _parse_and_create_resource(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 297, in _parse_and_create_resource
localstack_main | resource_tuple = parsing.parse_resource(logical_id, resource_json, resources_map)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/cloudformation/parsing.py", line 267, in parse_resource
localstack_main | resource_json = clean_json(resource_json, resources_map)
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 245, in clean_json
localstack_main | result = clean_json_orig(resource_json, resources_map)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/cloudformation/parsing.py", line 200, in clean_json
localstack_main | cleaned_val = clean_json(value, resources_map)
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 245, in clean_json
localstack_main | result = clean_json_orig(resource_json, resources_map)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/cloudformation/parsing.py", line 200, in clean_json
localstack_main | cleaned_val = clean_json(value, resources_map)
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 245, in clean_json
localstack_main | result = clean_json_orig(resource_json, resources_map)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/cloudformation/parsing.py", line 93, in clean_json
localstack_main | resource = resources_map[resource_json["Ref"]]
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/cloudformation/parsing.py", line 424, in
getitem
localstack_main | new_resource = parse_and_create_resource(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 268, in parse_and_create_resource
localstack_main | return _parse_and_create_resource(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 404, in _parse_and_create_resource
localstack_main | update_resource_id(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 469, in update_resource_id
localstack_main | backend.apis[api_id].resources.pop(resource.id, None)
localstack_main | KeyError: None
localstack_main |
localstack_main | 2020-09-03 17:13:48,955:API: Error on request:
localstack_main | Traceback (most recent call last):
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/werkzeug/serving.py", line 323, in run_wsgi
localstack_main | execute(self.server.app)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/werkzeug/serving.py", line 312, in execute
localstack_main | application_iter = app(environ, start_response)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/server.py", line 167, in
call
localstack_main | return backend_app(environ, start_response)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2464, in
call
localstack_main | return self.wsgi_app(environ, start_response)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
localstack_main | response = self.handle_exception(e)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
localstack_main | return cors_after_request(app.make_response(f(_args, *_kwargs)))
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
localstack_main | reraise(exc_type, exc_value, tb)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
localstack_main | raise value
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
localstack_main | response = self.full_dispatch_request()
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
localstack_main | rv = self.handle_user_exception(e)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
localstack_main | return cors_after_request(app.make_response(f(_args, *_kwargs)))
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
localstack_main | reraise(exc_type, exc_value, tb)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
localstack_main | raise value
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
localstack_main | rv = self.dispatch_request()
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
localstack_main | return self.view_functions
rule.endpoint
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/core/utils.py", line 146, in
call
localstack_main | result = self.callback(request, request.url, {})
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/core/responses.py", line 202, in dispatch
localstack_main | return cls()._dispatch(_args, *_kwargs)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/core/responses.py", line 312, in
dispatch
localstack_main | return self.call_action()
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/core/responses.py", line 397, in call_action
localstack_main | response = method()
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 886, in describe_stack_resource
localstack_main | for stack_resource in stack.stack_resources:
localstack_main | File "/usr/lib/python3.8/collections_abc.py", line 762, in iter
localstack_main | yield self._mapping[key]
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/cloudformation/parsing.py", line 424, in
getitem
localstack_main | new_resource = parse_and_create_resource(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 268, in parse_and_create_resource
localstack_main | return _parse_and_create_resource(
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 340, in _parse_and_create_resource
localstack_main | raise moto_create_error
localstack_main | File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 322, in _parse_and_create_resource
localstack_main | resource = parse_and_create_resource_orig(
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/cloudformation/parsing.py", line 297, in parse_and_create_resource
localstack_main | resource = resource_class.create_from_cloudformation_json(
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/awslambda/models.py", line 709, in create_from_cloudformation_json
localstack_main | function_name = properties["FunctionName"]
localstack_main | KeyError: 'FunctionName'
localstack_main | 2020-09-03T17:13:48:DEBUG:localstack.services.cloudformation.cloudformation_listener: Error response for CloudFormation action "UpdateStack" (500) POST /: b'\n<title>500 Internal Server Error</title>\n
Internal Server Error
\n
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
\n'
localstack_main | 2020-09-03 17:13:48,979:API: Error on request:
localstack_main | Traceback (most recent call last):
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/werkzeug/serving.py", line 323, in run_wsgi
localstack_main | execute(self.server.app)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/werkzeug/serving.py", line 312, in execute
localstack_main | application_iter = app(environ, start_response)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/server.py", line 167, in
call
localstack_main | return backend_app(environ, start_response)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2464, in
call
localstack_main | return self.wsgi_app(environ, start_response)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
localstack_main | response = self.handle_exception(e)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
localstack_main | return cors_after_request(app.make_response(f(_args, *_kwargs)))
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
localstack_main | reraise(exc_type, exc_value, tb)
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
localstack_main | raise value
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
localstack_main | response = self.full_dispatch_request()
localstack_main | File "/opt/code/localstack/.venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_d
┆Issue is synchronized with this Jira Task by Unito