-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(transfer): How to get the subnet ip addresses of a SFTP server hosted in a VPC? #14180
Comments
@gcaggia Yes this would require both a custom resource and an initial implementation of an L2 construct for We are unassigning and marking this issue as p2, which means that we are unable to work on this immediately. |
@iliapolo Thank you for your answer. I would be so grateful if you could help me with how I can get these IP addresses with a customer resource (I really need that for my current project I am working on) I tried following this code you share on another post:
But maybe it is not possible from Transfer, maybe I need to have a different approach and get the IP from the subnet. |
@gcaggia It looks like its not possible to do that with a single SDK call. You'll need to write a small lambda that fetches the address allocation id's from the server, and then uses them to query for the addresses. |
This looks like something that should be provided from the get go with CDK. |
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
I ran into the same issue. Is a solution available meanwhile? |
You were half-way there -- looks like you can get the DNS name to the server by doing this:
|
Description
I created an sftp server and I use the option
endpointType: 'VPC'
.The idea was to put the sftp server under a network load balancer allowing us to enhance the security and change the port to connect to the sftp server.
To do that, I attached the sftp server to two different subnets (from two different AZs) belonging to the same VPC.
The problem is once the sftp server is created, it is difficult to get the two IP addresses allocated to the sftp server (one per subnet)
This is what I would like to have and is red in the following image:
Use Case
I need these two IP addresses in my case for the network load balancer where I use them in the target group:
Problem: currently it is difficult to get
sftpServerIpSubnet1
andsftpServerIpSubnet2
.I tried something like:
But typescript did not like it because: endpointDetails is type
CfnServer.EndpointDetailsProperty | cdk.IResolvable
Proposed Solution
Add the attribute
endpointConfiguration
to CfnServersftpServer.endpointConfiguration
And we could have the ip addresses as followed:
Feedback: for the naming convention, it is great to follow the AWS console. This is why I suggested
endpointConfiguration.PrivateIPv4Address
, it matches the screenshot of the AWS console I previously shared.Other
I also created a stackoverflow question:
https://stackoverflow.com/questions/67099895/how-to-get-the-subnet-ip-addresses-of-a-sftp-server-hosted-in-a-vpc-with-aws-cdk
Maybe the answer is simple or maybe we need to use a custom resource for that, as mentioned in issue 11374:
#11374
The text was updated successfully, but these errors were encountered: