简体   繁体   中英

Is their a way to connect to AWS Storage Gateway without using its IP?

I Need to use SMB AWS Storage Gateway. I am able to create one with no issue and it works exactly as I want. However my concern right now is that I need to specify the IP of the ec2 the storage gateway is on to connect to it. Example //10.10.10.1/s3bucket_name. But what happens if the ec2 crashes or has any issues and restarts and comes back up with new IP. Then everything referencing the Gateway IP will be looking at incorrect IP. I was wondering what is a good solution for this so that if gateway IP would to change other services would not need to be updated to point to new IP. The gateway is in the cloud and not on premises.

You can use awscli or python/boto3 to describe your gateway before connect:

aws storagegateway describe-gateway-information --gateway-arn "arn:aws:storagegateway:us-west-2:123456789012:gateway/sgw-12A3456B"

Json output will contain Ipv4Address

Docs: https://docs.aws.amazon.com/cli/latest/reference/storagegateway/describe-gateway-information.html

You have your storage gateway configured with the Elastic IP .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM