Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Resource limit exceeded..
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "The AWS CloudFormation template for this Serverless application",
"Resources": {
"ServerlessDeploymentBucket": {
"Type": "AWS::S3::Bucket"
},
"CloudwatchUnderscoretoUnderscoreelasticsearchLogGroup": {
"Type": "AWS::Logs::LogGroup",
"Properties": {
"LogGroupName": "/aws/lambda/mya-input-logging-dev-cloudwatch_to_elasticsearch"
}
},
"IamRoleLambdaExecution": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"lambda.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
},
"Path": "/",
"RoleName": {
"Fn::Join": [
"-",
[
"mya-input-logging",
"dev",
"us-east-1",
"lambdaRole"
]
]
}
}
},
"IamPolicyLambdaExecution": {
"Type": "AWS::IAM::Policy",
"DependsOn": [
"IamRoleLambdaExecution"
],
"Properties": {
"PolicyName": {
"Fn::Join": [
"-",
[
"dev",
"mya-input-logging",
"lambda"
]
]
},
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
{
"Fn::Join": [
":",
[
{
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLogGroup",
"Arn"
]
},
"*"
]
]
}
]
},
{
"Effect": "Allow",
"Action": [
"s3:*",
"kinesis:*",
"es:*",
"ec2:*",
"cw:*"
],
"Resource": "*"
}
]
},
"Roles": [
{
"Ref": "IamRoleLambdaExecution"
}
]
}
},
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"S3Bucket": {
"Ref": "ServerlessDeploymentBucket"
},
"S3Key": "serverless/mya-input-logging/dev/1488471197010-2017-03-02T16:13:17.010Z/mya-input-logging.zip"
},
"FunctionName": "mya-input-logging-dev-cloudwatch_to_elasticsearch",
"Handler": "handler.cloudWatchToElasticSearch",
"MemorySize": 1024,
"Role": {
"Fn::GetAtt": [
"IamRoleLambdaExecution",
"Arn"
]
},
"Runtime": "nodejs4.3",
"Timeout": 30,
"Environment": {
"Variables": {
"ES_ENDPOINT": "10.0.0.76",
"ES_PORT": 9200
}
},
"VpcConfig": {
"SecurityGroupIds": [
"sg-bfc774c2"
],
"SubnetIds": [
"subnet-7f2a9d52"
]
}
},
"DependsOn": [
"IamPolicyLambdaExecution",
"IamRoleLambdaExecution"
]
},
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaVersionikMJ6Jq0SSuN3iWq6KCBneFQIyMzFmos9GgodawNo": {
"Type": "AWS::Lambda::Version",
"DeletionPolicy": "Retain",
"Properties": {
"FunctionName": {
"Ref": "CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction"
},
"CodeSha256": "ikMJ6Jq0SSuN3i+Wq6KCBneFQI/yMzFmos9GgodawNo="
}
},
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaPermissionAwslambdamyainputfeedsdevunsubscribe": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"FunctionName": {
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction",
"Arn"
]
},
"Action": "lambda:InvokeFunction",
"Principal": "logs.us-east-1.amazonaws.com",
"SourceArn": "arn:aws:logs:us-east-1:980537832331:log-group:/aws/lambda/mya-input-feeds-dev-unsubscribe:*"
}
},
"CloudwatchUnderscoretoUnderscoreelasticsearchSubscriptionFilterAwslambdamyainputfeedsdevunsubscribe": {
"Type": "AWS::Logs::SubscriptionFilter",
"Properties": {
"DestinationArn": {
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction",
"Arn"
]
},
"FilterPattern": "[timestamp=*Z, id, event]",
"LogGroupName": "/aws/lambda/mya-input-feeds-dev-unsubscribe"
},
"DependsOn": "CloudwatchUnderscoretoUnderscoreelasticsearchLambdaPermissionAwslambdamyainputfeedsdevunsubscribe"
},
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaPermissionAwslambdamyainputfeedsdevping": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"FunctionName": {
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction",
"Arn"
]
},
"Action": "lambda:InvokeFunction",
"Principal": "logs.us-east-1.amazonaws.com",
"SourceArn": "arn:aws:logs:us-east-1:980537832331:log-group:/aws/lambda/mya-input-feeds-dev-ping:*"
}
},
"CloudwatchUnderscoretoUnderscoreelasticsearchSubscriptionFilterAwslambdamyainputfeedsdevping": {
"Type": "AWS::Logs::SubscriptionFilter",
"Properties": {
"DestinationArn": {
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction",
"Arn"
]
},
"FilterPattern": "[timestamp=*Z, id, event]",
"LogGroupName": "/aws/lambda/mya-input-feeds-dev-ping"
},
"DependsOn": "CloudwatchUnderscoretoUnderscoreelasticsearchLambdaPermissionAwslambdamyainputfeedsdevping"
},
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaPermissionAwslambdamyainputorigindevdynamostreamevents": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"FunctionName": {
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction",
"Arn"
]
},
"Action": "lambda:InvokeFunction",
"Principal": "logs.us-east-1.amazonaws.com",
"SourceArn": "arn:aws:logs:us-east-1:980537832331:log-group:/aws/lambda/mya-input-origin-dev-dynamo_stream_events:*"
}
},
"CloudwatchUnderscoretoUnderscoreelasticsearchSubscriptionFilterAwslambdamyainputorigindevdynamostreamevents": {
"Type": "AWS::Logs::SubscriptionFilter",
"Properties": {
"DestinationArn": {
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction",
"Arn"
]
},
"FilterPattern": "[timestamp=*Z, id, event]",
"LogGroupName": "/aws/lambda/mya-input-origin-dev-dynamo_stream_events"
},
"DependsOn": "CloudwatchUnderscoretoUnderscoreelasticsearchLambdaPermissionAwslambdamyainputorigindevdynamostreamevents"
},
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaPermissionAwslambdamyainputorigindevdynamojobsearch": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"FunctionName": {
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction",
"Arn"
]
},
"Action": "lambda:InvokeFunction",
"Principal": "logs.us-east-1.amazonaws.com",
"SourceArn": "arn:aws:logs:us-east-1:980537832331:log-group:/aws/lambda/mya-input-origin-dev-dynamo_job_search:*"
}
},
"CloudwatchUnderscoretoUnderscoreelasticsearchSubscriptionFilterAwslambdamyainputorigindevdynamojobsearch": {
"Type": "AWS::Logs::SubscriptionFilter",
"Properties": {
"DestinationArn": {
"Fn::GetAtt": [
"CloudwatchUnderscoretoUnderscoreelasticsearchLambdaFunction",
"Arn"
]
},
"FilterPattern": "[timestamp=*Z, id, event]",
"LogGroupName": "/aws/lambda/mya-input-origin-dev-dynamo_job_search"
},
"DependsOn": "CloudwatchUnderscoretoUnderscoreelasticsearchLambdaPermissionAwslambdamyainputorigindevdynamojobsearch"
}
}
}
[10:13:15] Starting 'deploy-push-logging'...[10:13:15] Starting 'deploy-push-logging'...
WARNING: You are running v1.7.0. v1.8.0 will include the following breaking changes:
- Will replace IamPolicyLambdaExecution resource with inline policies -> https://git.io/vDilm
- "sls info" will output the short function name rather than the lambda name -> https://git.io/vDiWx
You can opt-out from these warnings by setting the "SLS_IGNORE_WARNING=*" environment variable.
Serverless: Packaging service...
Serverless: Compiling /aws/lambda/mya-input-feeds-dev-ping subscription filter object...
Serverless: Compiling /aws/lambda/mya-input-feeds-dev-unsubscribe subscription filter object...
Serverless: Compiling /aws/lambda/mya-input-origin-dev-dynamo_stream_events subscription filter object...
Serverless: Compiling /aws/lambda/mya-input-origin-dev-dynamo_job_search subscription filter object...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading service .zip file to S3 (8.57 KB)...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
................................Serverless: Deployment failed!
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: CloudwatchUnderscoretoUnderscoreelasticsearchSubscriptionFilterAwslambdamyainputfeedsdevping
- Resource limit exceeded..
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Your Environment Information -----------------------------
OS: darwin
Node Version: 7.0.0
Serverless Version: 1.7.0
service: mya-input-logging
custom:
stage: "${opt:stage, self:provider.stage}"
plugins:
- serverless-plugin-subscription-filter
- serverless-remove-cf-outputs-plugin
provider:
name: aws
runtime: nodejs4.3
iamRoleStatements:
- Effect: Allow
Action:
- s3:*
- kinesis:*
- es:*
- ec2:*
- cw:*
Resource: "*"
functions:
cloudwatch_to_elasticsearch:
handler: handler.cloudWatchToElasticSearch
timeout: 30
environment: ${file(env.yml):${self:custom.stage}.env}
vpc: ${file(env.yml):${self:custom.stage}.vpc}
events:
- subscriptionFilter:
stage: ${self:custom.stage}
logGroupName: /aws/lambda/mya-input-feeds-${self:custom.stage}-ping
filterPattern: '[timestamp=*Z, id, event]'
- subscriptionFilter:
stage: ${self:custom.stage}
logGroupName: /aws/lambda/mya-input-feeds-${self:custom.stage}-unsubscribe
filterPattern: '[timestamp=*Z, id, event]'
- subscriptionFilter:
stage: ${self:custom.stage}
logGroupName: /aws/lambda/mya-input-origin-${self:custom.stage}-dynamo_stream_events
filterPattern: '[timestamp=*Z, id, event]'
- subscriptionFilter:
stage: ${self:custom.stage}
logGroupName: /aws/lambda/mya-input-origin-${self:custom.stage}-dynamo_job_search
filterPattern: '[timestamp=*Z, id, event]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.