Comments (6)
I already got it working by hardcoding everything, so I can confirm it works without any issues.
Probably next weekend I will find some time to polish it and create a PR :)
from aws-lambda-power-tuning.
Hi @tenjaa 👋 thanks for sharing, I think this is a great feature request 🚀
We'll need to include a conditional VpcConfig
in the Globals section of the SAM template (similar to what we already do for the optional PermissionsBoundary
).
To do that, we also need a couple of new template Parameters (e.g. securityGroupIds
and subnetIds
).
It would look very similar to this:
Parameters:
securityGroupIds:
Type: List<AWS::EC2::SecurityGroup::Id>
Default: ''
subnetIds:
Type: List<AWS::EC2::Subnet::Id>
Default: ''
Conditions:
UseSecurityGroupIds: !Not [!Equals [!Ref securityGroupIds, '']]
UseSubnetIds: !Not [!Equals [!Ref subnetIds, '']]
UseVPCConfig: !Or [!Ref UseSecurityGroupIds, !Ref UseSubnetIds]
Globals:
VpcConfig: !If [UseVPCConfig, {
SecurityGroupIds: !If [UseSecurityGroupIds, !Ref securityGroupIds, !Ref AWS::NoValue],
SubnetIds: !If [UseSubnetIds, !Ref subnetIds, !Ref AWS::NoValue]
}, !Ref AWS::NoValue]
I haven't tested this and it's still missing the IAM managed policy part, but it should be a good starting point to implement it.
Do you feel like giving this a try and opening a PR? If not, I should be able to work on it myself in the next 4-5 weeks.
from aws-lambda-power-tuning.
Awesome, that sounds great 🚀
Let me know if you get stuck and/or need help.
Eventually, I'll make sure this new feature is available in the Terraform modules too :)
from aws-lambda-power-tuning.
@tenjaa I managed to spend some time on this :) Please have a look at this PR: #169
from aws-lambda-power-tuning.
Solved in #169 :)
from aws-lambda-power-tuning.
Thanks, @tenjaa 🙏
from aws-lambda-power-tuning.
Related Issues (20)
- Add wait/delay between invocations for heavily rate limited downstream dependencies HOT 2
- About handlering all `num` of execution HOT 5
- Need to support Lambda version HOT 1
- Lambda layer usage HOT 2
- Add optional description field for output report HOT 2
- lumigo-cli no longer maintained HOT 2
- Duration being under reported? HOT 3
- adding an option to get all the configurations results HOT 6
- NullReferenceException when testing function HOT 4
- Support for testing stream-based functions HOT 2
- Option to Consume Payload from SQS source? HOT 3
- Actual Payload Shared in Step Functions Console On Function Error HOT 8
- Add KMS permission(s) that may be optionally needed HOT 11
- cost discrepancy on small lambdas HOT 2
- Add logic to identify insufficient resources causing timeout HOT 5
- 💡 Add this project to awesome-italia-opensource HOT 2
- Feature Request: Allow naming of statemachine HOT 5
- Upgrade to Node 20 HOT 1
- Getting Error While Increasing Power values to 10240 MB HOT 1
- Support for array payload accepting functions 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 aws-lambda-power-tuning.