Closed sync-by-unito[bot] closed 3 years ago
➤ Mohit Alonja commented:
leungas Thank you for reporting this issue, Can you please give it a try with a latest release or latest docker image? We have tried to reproduce it (using events also), but we are not able to. Also, recently our upstream package spulec/moto ( https://github.com/spulec/moto/commit/49d92861c0acaa006052a7a94355a5870cdc92d5#diff-9497eee72b94d2373afce2e63017ec39 )(commit) has done singificant cloudformation refactoring. This might have solved this issue already. Thanks.
➤ Danilo Pereira commented:
Similar issues happening here.
Serverless: Load command interactiveCli Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command config:tabcompletion Serverless: Load command config:tabcompletion:install Serverless: Load command config:tabcompletion:uninstall Serverless: Load command create Serverless: Load command install Serverless: Load command package Serverless: Load command deploy Serverless: Load command deploy:function Serverless: Load command deploy:list Serverless: Load command deploy:list:functions Serverless: Load command invoke Serverless: Load command invoke:local Serverless: Load command info Serverless: Load command logs Serverless: Load command metrics Serverless: Load command print Serverless: Load command remove Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command slstats Serverless: Load command plugin Serverless: Load command plugin Serverless: Load command plugin:install Serverless: Load command plugin Serverless: Load command plugin:uninstall Serverless: Load command plugin Serverless: Load command plugin:list Serverless: Load command plugin Serverless: Load command plugin:search Serverless: Load command config Serverless: Load command config:credentials Serverless: Load command rollback Serverless: Load command rollback:function Serverless: Load command upgrade Serverless: Load command uninstall Serverless: Load command requirements Serverless: Load command requirements:clean Serverless: Load command requirements:install Serverless: Load command requirements:cleanCache Serverless: Load command deploy Serverless: Load command login Serverless: Load command logout Serverless: Load command generate-event Serverless: Load command test Serverless: Load command dashboard Serverless: Load command output Serverless: Load command output:get Serverless: Load command output:list Serverless: Load command param Serverless: Load command param:get Serverless: Load command param:list Serverless: Load command studio
Serverless Warning --------------------------------------
A valid environment variable to satisfy the declaration 'env:SHOPPER_PLAN_TOPIC_ARN' could not be found.
Serverless Warning --------------------------------------
A valid environment variable to satisfy the declaration 'env:SHOPPER_PLAN_TOPIC_ARN' could not be found.
Serverless: [AWS ssm 400 0.698s 0 retries] getParameter({ Name: '/aws/reference/secretsmanager/local/mysql_application_credentials', WithDecryption: true })
Serverless Warning --------------------------------------
A valid SSM parameter to satisfy the declaration 'ssm:/aws/reference/secretsmanager/local/mysql_application_credentials~true' could not be found.
Serverless Warning --------------------------------------
A valid SSM parameter to satisfy the declaration 'ssm:/aws/reference/secretsmanager/local/mysql_application_credentials~true' could not be found.
Serverless Warning --------------------------------------
A valid SSM parameter to satisfy the declaration 'ssm:/aws/reference/secretsmanager/local/mysql_application_credentials~true' could not be found.
Serverless Warning --------------------------------------
A valid SSM parameter to satisfy the declaration 'ssm:/aws/reference/secretsmanager/local/mysql_application_credentials~true' could not be found.
Serverless Warning --------------------------------------
A valid SSM parameter to satisfy the declaration 'ssm:/aws/reference/secretsmanager/local/mysql_application_credentials~true' could not be found.
Serverless Warning --------------------------------------
A valid SSM parameter to satisfy the declaration 'ssm:/aws/reference/secretsmanager/local/mysql_application_credentials~true' could not be found.
Serverless: Invoke deploy Serverless: Invoke package Serverless: Invoke aws:common:validate Serverless: Using serverless-localstack Serverless: Warning: Unable to find plugin named: TypeScriptPlugin Serverless: Invoke aws:common:cleanupTempDir Serverless: Generating requirements.txt from Pipfile... Serverless: Parsed requirements.txt from Pipfile in /home/danilo/Code/clubbi/delivery-planner/.serverless/requirements.txt... Serverless: Using static cache of requirements found at /home/danilo/.cache/serverless-python-requirements/1712547e4ebdc05b79e5a71087615c045868cd578fcdd896a3b4c43256850d20_slspyc ... Serverless: Packaging service... Serverless: Excluding development dependencies... Serverless: Injecting required Python packages to package... Serverless: Invoke aws:package:finalize Serverless: Invoke aws:common:moveArtifactsToPackage Serverless: Invoke aws:common:validate Serverless: Invoke aws:deploy:deploy Serverless: [AWS cloudformation 200 0.032s 0 retries] describeStacks({ StackName: 'orders-local' }) Serverless: [AWS cloudformation 200 0.016s 0 retries] describeStackResource({ StackName: 'orders-local', LogicalResourceId: 'ServerlessDeploymentBucket' }) Serverless: [AWS s3 200 0.022s 0 retries] listObjectsV2({ Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Prefix: 'serverless/orders/local' }) Serverless: [AWS s3 200 0.034s 0 retries] headObject({ Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601993915002-2020-10-06T14:18:35.002Z/orders.zip' }) Serverless: [AWS s3 200 0.038s 0 retries] headObject({ Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601993915002-2020-10-06T14:18:35.002Z/compiled-cloudformation-template.json' }) Serverless: [AWS lambda 404 0.019s 0 retries] getFunction({ FunctionName: 'local-generate_shopper_plan' }) Serverless: [AWS lambda 404 0.025s 0 retries] getFunction({ FunctionName: 'local-save_order' }) Serverless: [AWS lambda 404 0.01s 0 retries] getFunction({ FunctionName: 'local-send_shopper_plan_email' }) Serverless: [AWS sts 200 0.019s 0 retries] getCallerIdentity({}) Serverless: Uploading CloudFormation file to S3... Serverless: [AWS s3 200 0.018s 0 retries] putObject({ Body: <Buffer 7b 22 41 57 53 54 65 6d 70 6c 61 74 65 46 6f 72 6d 61 74 56 65 72 73 69 6f 6e 22 3a 22 32 30 31 30 2d 30 39 2d 30 39 22 2c 22 44 65 73 63 72 69 70 74 ... 9478 more bytes>, Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/compiled-cloudformation-template.json', ContentType: 'application/json', Metadata: { filesha256: '7L9dGoFR2uDBFpxTRkEpQZTG8uUalVPLoKnohyIl4v8=' } }) Serverless: Uploading artifacts... Serverless: Uploading service orders.zip file to S3 (27.62 MB)... Serverless: [AWS s3 200 0.037s 0 retries] createMultipartUpload({ Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/orders.zip', ContentType: 'application/zip', Metadata: { filesha256: 'cIAqq1Ikop+0Fruhq9QyuyVdX9GfmnYNX1ILklYT56U=' } }) Serverless: [AWS s3 200 0.29s 0 retries] uploadPart({ Body: <Buffer 16 03 8a 9c 07 14 29 0c 81 74 cc af b9 65 11 c4 ba 95 ff 73 20 6b 30 fa d1 bb d5 da 82 fd 93 f9 24 73 3a 57 a4 3b 48 40 ad db 22 57 a3 92 d9 f4 c1 9b ... 5242830 more bytes>, ContentLength: 5242880, PartNumber: 2, Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/orders.zip', UploadId: 'q78JQ8E2rybcCHW3Bb8Vu372QTCJNPUu9PtpLld0vc0xl7VlaNX3EqA' }) Serverless: [AWS s3 200 0.341s 0 retries] uploadPart({ Body: <Buffer 49 2a fe 3f 66 d4 16 85 51 09 14 b1 8f 5c d0 d9 d2 54 6d 1c 63 7f 9f 82 fd aa 73 4c 52 c5 39 e2 d5 f4 52 63 82 14 8e c0 1e d1 0f dc fc 52 35 41 ca 1d ... 5242830 more bytes>, ContentLength: 5242880, PartNumber: 3, Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/orders.zip', UploadId: 'q78JQ8E2rybcCHW3Bb8Vu372QTCJNPUu9PtpLld0vc0xl7VlaNX3EqA' }) Serverless: [AWS s3 200 0.358s 0 retries] uploadPart({ Body: <Buffer 50 4b 03 04 0a 00 00 00 08 00 00 00 21 00 b5 47 7a cc 76 00 00 00 18 01 00 00 12 00 00 00 6c 61 6d 62 64 61 5f 68 61 6e 64 6c 65 72 73 2e 70 79 75 ce ... 5242830 more bytes>, ContentLength: 5242880, PartNumber: 1, Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/orders.zip', UploadId: 'q78JQ8E2rybcCHW3Bb8Vu372QTCJNPUu9PtpLld0vc0xl7VlaNX3EqA' }) Serverless: [AWS s3 200 0.125s 0 retries] uploadPart({ Body: <Buffer 17 42 bd f2 1c 4a b4 c7 bc 26 54 a9 39 64 ea 00 f8 58 ba a2 54 7e d0 6d f0 6f 17 c8 f7 d4 84 fa cd 93 7a 30 ee ad fc 19 e0 5e d4 81 06 7d 13 3d 94 0d ... 2745289 more bytes>, ContentLength: 2745339, PartNumber: 6, Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/orders.zip', UploadId: 'q78JQ8E2rybcCHW3Bb8Vu372QTCJNPUu9PtpLld0vc0xl7VlaNX3EqA' }) Serverless: [AWS s3 200 0.279s 0 retries] uploadPart({ Body: <Buffer 4b 6e a0 24 39 b7 59 ca 9e a6 6c f5 ed 92 6b bf b7 bd c2 6f aa 19 c2 1e 4a d5 ef 22 c5 f7 2b 3a 0d 11 51 54 34 05 88 f6 bb 8e 40 54 14 ec 7d 8f c6 ad ... 5242830 more bytes>, ContentLength: 5242880, PartNumber: 5, Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/orders.zip', UploadId: 'q78JQ8E2rybcCHW3Bb8Vu372QTCJNPUu9PtpLld0vc0xl7VlaNX3EqA' }) Serverless: [AWS s3 200 0.33s 0 retries] uploadPart({ Body: <Buffer 3c 0a 10 4e b5 01 7d 4b a3 93 ba 61 97 c6 63 db c7 e1 05 eb de 11 c2 b8 88 5b 1f 2b bf 52 01 22 28 40 93 70 ed e0 1d 1e 2b af 42 c9 6f 80 fe 87 fe be ... 5242830 more bytes>, ContentLength: 5242880, PartNumber: 4, Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/orders.zip', UploadId: 'q78JQ8E2rybcCHW3Bb8Vu372QTCJNPUu9PtpLld0vc0xl7VlaNX3EqA' }) Serverless: [AWS s3 200 0.036s 0 retries] completeMultipartUpload({ MultipartUpload: { Parts: [ { ETag: '"6201b1ced4a8827de3c34443040c0a32"', PartNumber: 1 }, { ETag: '"5de6ba5d00fbf3ecb6f65841c588888f"', PartNumber: 2 }, { ETag: '"b5481faffd2cb4de02309efdedd0d60e"', PartNumber: 3 }, { ETag: '"7a6deb5c005eaf26c09900eb64fcb64a"', PartNumber: 4 }, { ETag: '"191faca21ed3d1c4c24797609c02e04b"', PartNumber: 5 }, { ETag: '"fc694d2c5134d0aabf319d71ad1970c4"', PartNumber: 6 },
] }, Bucket: 'orders-local-serverlessdeploymentbucket-rhk27u1y2suv', Key: 'serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/orders.zip', UploadId: 'q78JQ8E2rybcCHW3Bb8Vu372QTCJNPUu9PtpLld0vc0xl7VlaNX3EqA' }) Serverless: Validating template... Serverless: Skipping template validation: Unsupported in Localstack Serverless: Updating Stack... Serverless: [AWS cloudformation 200 0.181s 0 retries] updateStack({ StackName: 'orders-local', Capabilities: [ 'CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM', length: 2 ], Parameters: [ length: 0 ], TemplateURL: 'https://s3.amazonaws.com/orders-local-serverlessdeploymentbucket-rhk27u1y2suv/serverless/orders/local/1601994111990-2020-10-06T14:21:51.990Z/compiled-cloudformation-template.json', Tags: [ { Key: 'STAGE', Value: 'local' }, length: 1 ] }) Serverless: Checking Stack update progress... Serverless: [AWS cloudformation 200 0.039s 0 retries] describeStackEvents({ StackName: 'arn:aws:cloudformation:us-east-1:000000000000:stack/orders-local/46a8d068-3b88-4255-9b65-ab955c2761e9' }) . Serverless: Stack update finished... Serverless: Invoke aws:info Serverless: [AWS cloudformation 200 0.033s 0 retries] describeStacks({ StackName: 'orders-local' }) Serverless: [AWS cloudformation 500 0.621s 3 retries] listStackResources({ StackName: 'orders-local', NextToken: undefined })
Type Error ---------------------------------------------
TypeError: message.startsWith is not a function
at /home/danilo/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:816:23
at runMicrotasks (
Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Issues: forum.serverless.com
Your Environment Information --------------------------- Operating System: linux Node Version: 12.18.3 Framework Version: 2.4.0 Plugin Version: 4.0.4 SDK Version: 2.3.2 Components Version: 3.2.1
➤ Doggy commented:
Also seeing this TypeError: message.startsWith is not a function error. Deleting the old docker image seems to be working for me.
➤ Danilo Pereira commented:
joedevgee can you please tell me your image ID?
My is 5b792b1d1ef2
➤ msteve-tokzu commented:
I'm also seeing this when I try to deploy multiple cognito triggers using the CDK in the latest localstack pull (as of today).
When I try to deploy to localstack with cdklocal I get the following error:
localstack_main | 2020-10-27T20:26:42:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.
"cogsignupPreSignUpCognito639C1C9E": { "Type": "AWS::Lambda::Permission", "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ "cogsignupF20EC8E8", "Arn" ] }, "Principal": "cognito-idp.amazonaws.com" }, "Metadata": { "aws:cdk:path": "ReproStack/cogsignup/PreSignUpCognito" } }, Here is the CDK template (I have tried with CDK dependencies pinned to 1.64.1):
import as cdk from "@aws-cdk/core"; import as ddb from "@aws-cdk/aws-dynamodb"; import as lambda from "@aws-cdk/aws-lambda"; import as apigw from "@aws-cdk/aws-apigateway"; import as cognito from "@aws-cdk/aws-cognito"; import {UserPool, AccountRecovery, StringAttribute} from "@aws-cdk/aws-cognito"; import { Duration } from "@aws-cdk/core"; import as path from "path";
export class ReproStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { super(scope, id, props);
// Create databases const myTable = new ddb.Table(this, "mytable", { partitionKey: { name: "Pk", type: ddb.AttributeType.STRING, }, tableName: "mytable", billingMode: ddb.BillingMode.PAY_PER_REQUEST, });
const lambdaFn = new lambda.Function(this, "apilambda", { code: lambda.Code.fromAsset( path.join(__dirname, "../../../out/function.zip") ), timeout: cdk.Duration.seconds(300), runtime: lambda.Runtime.GO_1_X, handler: "server_unix", environment: { TABLE_NAME: myTable.tableName, }, });
const signUpLambdaFn = new lambda.Function(this, "cogsignup", { code: lambda.Code.fromAsset( path.join(__dirname, "../../../out/cogs.zip") ), timeout: cdk.Duration.seconds(300), runtime: lambda.Runtime.GO_1_X, handler: "cog_signup", environment: { USER_PROFILE_TABLE_NAME: myTable.tableName, }, });
const postConfLambdaFn = new lambda.Function(this, "cogpostconf", { code: lambda.Code.fromAsset( path.join(__dirname, "../../../out/cogp.zip") ), timeout: cdk.Duration.seconds(300), runtime: lambda.Runtime.GO_1_X, handler: "cog_postconf", environment: { USER_PROFILE_TABLE_NAME: myTable.tableName, }, });
// Create user pool
const userPool: UserPool = new cognito.UserPool(this, id + "pool", {
userPoolName: ${id}-pool
,
autoVerify: {
email: true
},
passwordPolicy: {
minLength: 8,
requireDigits: false,
requireLowercase: false,
requireSymbols: false,
requireUppercase: false,
tempPasswordValidity: Duration.days(7)
},
selfSignUpEnabled: true,
accountRecovery: AccountRecovery.EMAIL_ONLY,
signInAliases: {
email: true,
preferredUsername: true,
username: true
},
signInCaseSensitive: false,
standardAttributes: {
givenName: {
mutable: true,
required: false
},
familyName: {
mutable: true,
required: false
},
email: {
mutable: true,
required: true
},
phoneNumber: {
mutable: true,
required: false
},
profilePicture: {
mutable: true,
required: false
},
birthdate: {
mutable: true,
required: false
}
},
customAttributes: {
'dummystuff': new StringAttribute({
mutable: true
}) }, lambdaTriggers: { preSignUp: signUpLambdaFn, postConfirmation: postConfLambdaFn } });
// Create client with some cfn goodness const userPoolClient = new cognito.UserPoolClient(this, id + "web", { userPool: userPool, generateSecret: false, authFlows: { adminUserPassword: true, userPassword: true }, oAuth: { callbackUrls: ["http://localhost:3000"], scopes: [ cognito.OAuthScope.COGNITO_ADMIN, cognito.OAuthScope.EMAIL, cognito.OAuthScope.OPENID, cognito.OAuthScope.PHONE, cognito.OAuthScope.PROFILE ], flows: { authorizationCodeGrant: true, implicitCodeGrant: true } } });
myTable.grantReadWriteData(lambdaFn); myTable.grantReadWriteData(signUpLambdaFn); myTable.grantReadWriteData(postConfLambdaFn);
const api = new apigw.RestApi(this, "myapiendpoint", { restApiName: "MyRestApi", }); const apiRoot = api.root.addResource("api"); const integration = new apigw.LambdaIntegration(lambdaFn); const proxy = apiRoot.addProxy({ anyMethod: true, defaultIntegration: integration, }); } }
➤ msteve-tokzu commented:
This PR looks like a similar issue but after looking at the code, I'm not sure it's going to fix the root cause here: https://github.com/spulec/moto/pull/3396
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
:The setup for
localstack
is as follow:The output from serverless was like this...
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'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n
Internal Server Error
\nThe 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'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\nInternal Server Error
\nThe 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_functionsrule.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/_collectionsabc.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'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\nInternal Server Error
\nThe 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