Friday, December 2, 2016

Amazon S3 - How To Create User And Grant Permissions To Access And Manage Account Files

AWS Policy Generator

Design Pattern: great tutorial for beginners...

Best Tutorial: Hello World Web Service Example

SOAP: Generating Stub Code for a Java Client

Generating Stub Code for a Java Client

Use the following steps to generate the stub code for a Java web services client application, using the wsimport tool that is included with the Java Development Kit.
  1. Open an xterm or command prompt window and change to the directory that contains the wsimport program, usually JDK_install_dir/bin/.
  2. At the command prompt, type wsimport -s source_dir -d classes_dir URL_TO_WSDL and press Enter.
    For example, to generate stub classes for the SAAS version of the Named Resource Service, you might enter the following command:
    wsimport -s output/source -d output/classes http://dev.pb.com/NamedResourceService/services/NamedResourceService?wsdl
After the command has been executed, the generated source .java files are placed within the directory you specified with the -s option, and the compiled .class files are placed within the directory you specified with the -d option.

AWS various access rule

  1. Bucket Object expires after 24 hours:

IAM Policy Warning

Please make sure that if you use this code you create an appropriate IAM account policy to prevent mis-use. Example, a policy like the following would only allow PUT access to the bucket for a specific IAM user. You could also set the bucket objects to automatically expire after 24 hours which would prevent people flooding your account.
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt126637111000",
      "Effect": "Allow",
      "Action": [
        "s3:PutObject"
      ],
      "Resource": [
        "arn:aws:s3:::your_bucket_name"
      ]
    }
  ]
}