Comments (3)
That has nothing to do with this plugin but with Serverless itself.
You can read how to do that here: https://serverless.com/framework/docs/providers/aws/guide/iam#custom-iam-roles-for-each-function
from serverless-plugin-warmup.
@juanjoDiaz thanks for info.
Yeah i do agree, with that, but how to give custom role to warmup function.
i want to do some thing like this
custom:
warmup:
cleanFolder: false,
memorySize: 256
name: 'make-them-pop'
schedule: 'cron(0/5 8-17 ? * MON-FRI *)' // Run WarmUP every 5 minutes Mon-Fri between 8:00am and 5:55pm (UTC)
timeout: 20
prewarm: true // Run WarmUp immediately after a deployment
folderName: '_warmup' // Name of the folder created for the generated warmup lambda
role: myCustRole0
.....
resources:
Resources:
myCustRole0:
Type: AWS::IAM::Role
Properties:
Path: /my/cust/path/
RoleName: MyCustRole0
AssumeRolePolicyDocument:
Version: '2017'
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action: sts:AssumeRole
Policies:
- PolicyName: myPolicyName
PolicyDocument:
Version: '2017'
Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource:
- 'Fn::Join':
- ':'
-
- 'arn:aws:logs'
- Ref: 'AWS::Region'
- Ref: 'AWS::AccountId'
- 'log-group:/aws/lambda/*:*:*'
- Effect: Allow
Action:
- ec2:CreateNetworkInterface
- ec2:DescribeNetworkInterfaces
- ec2:DetachNetworkInterface
- ec2:DeleteNetworkInterface
Resource: "*"
from serverless-plugin-warmup.
You are right :)
My PR above should add the capability that you want.
I don't have any serverless project setup at the moment so I couldn't test it. It would be great if you could :)
from serverless-plugin-warmup.
Related Issues (20)
- Not working with Serverless Webpack HOT 2
- AWS SDK v3 upgrade is a breaking change HOT 8
- Is @aws-sdk/client-lambda now a peer dependency? HOT 2
- Websocket warmup HOT 2
- warm up plugin webpack bundling issue HOT 5
- Review lifecycle hooks of different plugins to ensure that there are no issues HOT 1
- FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory HOT 2
- Is the pricing still accurate in Readme? HOT 1
- Deployment failed on Windows when using warmup plugin HOT 2
- getting issue when we update nodejs 18.x HOT 2
- How to disable warmers by default, and enable them only for specific lambdas? HOT 2
- Missing folders in warmup lambda once deployed on newer serverless versions HOT 3
- Missing configuration option `alias` from schema
- [Clarification] What is prewarm actually doing? HOT 1
- v8.2.1 requires custom config when used with serverless-esbuild HOT 7
- Description error? HOT 3
- Connection timeout doesn't seem to be working HOT 1
- TypeError: Cannot set properties of null (setting 'WarmUpPluginDefaultRole') HOT 1
- Plugin creates a empty lambda with no code
- Transform failed with 1 error. ERROR: The symbol "i" has already been declared HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-plugin-warmup.