rhythmic-student-36708
01/07/2021, 2:32 PM"PROBLEM: Lambda internal error. Please contact Lambda customer support."
in the LastProcessingResult output for the ESMbrave-planet-10645
01/07/2021, 2:33 PMrhythmic-student-36708
01/07/2021, 2:34 PMexport async function writeOnTopic(
event: APIGatewayProxyEvent
): Promise<APIGatewayProxyResult> {
return {
statusCode: 200,
body: JSON.stringify(event)
};
}
numberOfNatGateways: 2
in the vpc configbrave-planet-10645
01/07/2021, 2:51 PMAPIGatewayProxyEvent
is the correct input type for this type of messageany
for nowrhythmic-student-36708
01/07/2021, 2:59 PMexport async function writeOnTopic(
event: any
): Promise<any> {
return {
statusCode: 200,
body: JSON.stringify(event)
};
}
PROBLEM: Lambda internal error. Please contact Lambda customer support.
brave-planet-10645
01/07/2021, 3:26 PMrhythmic-student-36708
01/07/2021, 3:27 PMbrave-planet-10645
01/07/2021, 3:30 PMrhythmic-student-36708
01/07/2021, 3:31 PMconst securityGroup = new aws.ec2.SecurityGroup('ciii-kafka-sg-2', {
vpcId: vpc,
ingress: [
{
fromPort: 0,
toPort: 0,
protocol: '-1',
cidrBlocks: ['0.0.0.0/0']
}
],
egress: [
{
fromPort: 0,
toPort: 0,
protocol: '-1',
cidrBlocks: ['0.0.0.0/0']
}
]
});
brave-planet-10645
01/07/2021, 3:33 PMrhythmic-student-36708
01/07/2021, 3:33 PMconst lambdaConsumerRole = new aws.iam.Role('development-ciii-kafka-lambda-consumer-role-2', {
assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal({
Service: '<http://lambda.amazonaws.com|lambda.amazonaws.com>'
})
});
const policyAttachment = new aws.iam.PolicyAttachment('development-ciii-kafka-policy-attachment=2', {
roles: [lambdaConsumerRole.name],
policyArn: 'arn:aws:iam::aws:policy/service-role/AWSLambdaMSKExecutionRole'
});
AWSLambdaMSKExecutionRole
should be enoughconst consumerLambda = new aws.lambda.CallbackFunction('ciii-development-consumer-lambda-5', {
runtime: aws.lambda.NodeJS12dXRuntime,
role: lambdaConsumerRole,
callback: writeOnTopic,
vpcConfig: {
securityGroupIds: [securityGroup.id],
subnetIds: privateSubnets.apply(s => s.map((x: {id: string}) => x.id))
}
});
brave-planet-10645
01/07/2021, 3:35 PMrhythmic-student-36708
01/07/2021, 3:36 PMbrave-planet-10645
01/07/2021, 3:36 PMvpcConfig: {
securityGroupIds: [securityGroup.id],
subnetIds: privateSubnets.apply(s => s.map((x: {id: string}) => x.id))
}
from the lambda to remove it from the vpc. I don't know if it can't be in a vpc for it to work or it just doesn't need to berhythmic-student-36708
01/07/2021, 3:39 PMbrave-planet-10645
01/07/2021, 3:43 PMrhythmic-student-36708
01/07/2021, 3:44 PMbrave-planet-10645
01/07/2021, 3:45 PMconst policyAttachment2 = new aws.iam.PolicyAttachment('development-ciii-kafka-policy-attachment=3', {
roles: [lambdaConsumerRole.name],
policyArn: aws.iam.ManagedPolicies.AWSLambdaFullAccess
});
when I'm doing testing I use the full access one like aboverhythmic-student-36708
01/07/2021, 3:49 PMbrave-planet-10645
01/07/2021, 3:52 PMaws.iam.ManagedPolicy.AWSLambdaFullAccess
(singular ManagedPolicy
)rhythmic-student-36708
01/07/2021, 3:54 PMCallbackFunction
just remove it?brave-planet-10645
01/07/2021, 3:59 PMrhythmic-student-36708
01/07/2021, 3:59 PMbrave-planet-10645
01/07/2021, 4:03 PMrhythmic-student-36708
01/07/2021, 4:03 PMbrave-planet-10645
01/07/2021, 4:24 PMrhythmic-student-36708
01/07/2021, 4:26 PMbrave-planet-10645
01/07/2021, 5:31 PM