AWS Samples Behind a Corporate Firewall

The AWS Java SDK includes some interesting examples of how to use the API for a range of different use cases ( S3, SQS, SNS etc )

These work well if they are installed on a EC2 instance.

However, what if you are behind a Corporate Firewall and you want the example to access the AWS services on the internet.?


The Amazon S3 Client Object contains a constructor which receives a Client Configuration Object.

AmazonS3Client s3Client = new AmazonS3Client(AWSCredentials creds, ClientConfiguration config)

The Client Configuration object has methods to establish a proxy configuration so that the client can connect into the internet via the proxy.

ClientConfiguration config = new ClientConfiguration();
config.setProxyHost("ProxyHostName");
config.setProxyUsername("ProxyUserName");
config.setProxyPassword("ProxyPassword");

If you add this type of code into a AWS Sample then you should be able to punch your way through the Corporate Firewall with a AWS Application.




Comments

Popular posts from this blog

Vaadin - GRID Component

Connecting a Vaadin SQL Container to a Combo Box

Web Cam and Vaadin