Comments (10)
Looking for same feature.
AWS CLI has flag called --allow-reassociation
which is auto deassociate desired IP from any other EC2
aws ec2 associate-address --instance-id=$EC2INSTANCE_ID --allocation-id=$EIPALLOC_ID --allow-reassociation --region=$EC2REGION
from aws-ec2-assign-elastic-ip.
is there any update on this? If no-one is planning or currently working on it - I could contribute a PR for this. Please let me know. Thanks!
from aws-ec2-assign-elastic-ip.
@ankitcha No active work ongoing for this one. Please submit a PR. I'd be happy to review and merge.
from aws-ec2-assign-elastic-ip.
I need this too. I will submit a PR.
from aws-ec2-assign-elastic-ip.
Hi Sebastian,
How I need to run this code in Lambda ?
My task is to attach EIP's to newly launched instances, I've setup the Auto Scaling Group and created the Life Cycle Hooks. But how can I put this code in Lambda ?
from aws-ec2-assign-elastic-ip.
With boto3 in master, I've put up a branch that adds support for controlling AllowReassociation via a CLI flag:
https://github.com/pmkane/aws-ec2-assign-elastic-ip/tree/allow_reassociation
Currently, it does not prefer to assign unassociated IPs, in the case that multiple IPs are available for association. This meets our internal requirements, but I imagine could be surprising behavior if someone runs the command without any command-line requirements.
In our own use case, we would only use --allow-reassociation in combination with --valid-ips with a single IP specified. If that fit other folks' requirements too, we could enforce that policy in the tool.
Thoughts @sebdah or others?
from aws-ec2-assign-elastic-ip.
@pmkane I think there is a clear use case for --allow-reassociation
(false
by default). Your use case with --valid-ips
is likely the most common and least dangerous one. But I'm not so sure we should limit the tool to that requirement.
However, maybe a safe behavior would be to enforce --valid-ips
in the normal use case and add a --force
flag to override that check?
Happy to review / merge etc, so feel free to submit a PR.
from aws-ec2-assign-elastic-ip.
In addition to ☝️, #40 is adding a flag --tag
which should probably also be considered along with --valid-ips
.
from aws-ec2-assign-elastic-ip.
Thanks @sebdah , agreed with all. If the PR for #40 is going to be merged soon, I will wait until that happens and then submit a PR. If not, I'll go ahead now.
from aws-ec2-assign-elastic-ip.
👍 I think you can go ahead 🙇, there's some work to get #40 ready for merging.
from aws-ec2-assign-elastic-ip.
Related Issues (20)
- Daemon HOT 2
- Reassociate flag? HOT 1
- Error While use aws-ec2-assign-elastic-ip
- Manage network interface only EIP HOT 2
- Does this exist for ebs too? HOT 1
- Update release in PyPI HOT 1
- Fatal errors with current version (NameError: global name 'expected_state' is not defined) HOT 4
- Race condition results in EIP association failing HOT 4
- KeyError on instance-id
- ValueError: Required parameter public_ip not set HOT 1
- 0.8.0 with --valid-ips results in 'No unassociated Elastic IP found!' error HOT 2
- Assign from a pool of EIP HOT 1
- v0.10.2 is breaking awscli HOT 2
- ec2_metadata package not installed automatically HOT 1
- aws-ec2-assign-elastic-ip is not assigning EIP's to the EC2 instances HOT 4
- Need guidance on executing in Windows HOT 1
- ModuleNotFoundError: No module named 'ConfigParser'
- Implement dry run mode HOT 1
- Timeout when CIDR=0.0.0.0/0 HOT 3
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-ec2-assign-elastic-ip.