Using AWS SDK

The Automation Studio provides templates that can be used in various use cases. Template provides Flow examples for each situation, so you can create Flows faster and easier.

The 'AWS : Get S3 Object' template provides a example that using AWS SDK. Through this tutorial, you can learn ...

  • How to use a 'AWS Config' node.
  • How to use a 'AWS SDK' node.

AWS Config

When AWS SDK nodes are invoked, AWS Config node is required.

Properties

  • Name: You can tag or describe this aws-config.
  • Region: To connect programmatically to an AWS service, you use an endpoint. An endpoint is the URL of the entry point for an AWS web service.
  • AccessKey: Access keys are long-term credentials for an IAM user or the AWS account root user. You can use access keys to sign programmatic requests to the AWS CLI or AWS API (directly or using the AWS SDK). For more information, see Signing AWS API Requests in the Amazon Web Services General Reference.
  • SecretKey: Manage your access keys as securely as you do your user name and password. Do not provide your access keys to a third party, even to help find your canonical user ID. By doing this, you might give someone permanent access to your account.
  • Proxy: It is not used in the runtime environment of Samsung Automation Studio Cloud.

AWS SDK

You can extend this flow by connecting it to your AWS using the AWS SDK node. Refer to AWS Api Documents.

Properties

  • Name: You can tag or describe this aws-config.
  • AWS Config: Choose a AWS Config Node.
  • Service: Choose a AWS Service.
  • Method: Insert a Method of Service. refer to "Method Summary" section on AWS Api Documents.
  • Params: Insert a params of method. refer to each method description on AWS Api Documents. It's a JSON string. You can use the mustache templates.

Get S3 Object

The flow below uses the AWS SDK to get an S3 object. It is the aws sdk for javascript. refer to AWS S3 Api.

Nodes

  • AWS Config: Set up available AWS.
  • Config: Define the bucket name and prefix.
  • Http request: Create a Web URL to access S3.
  • switch: If key is passed through parameter, it downloads s3 object. If key is missing, it returns a list of s3 objects in json format.
  • AWS SDK: Use the AWS SDKs.
  • Http response: The response to an Http request.

Set a properties

An example of Properties that uses the AWS SDKs to look up a list of S3 objects.

To use the AWS SDK, you must enter the desired service and method correctly. And you must pass the required parameters of the method. Be sure to refer to the AWS Api Documents. When entering parameters of a form, they can be used dynamically through the mustache templates.

The second AWS SDK node downloads the s3 object using the key parameter of the http request.

Practice yourself

You can use every AWS SDK. Practice yourself. For example, you can query metric data in CloudWatch and automatically generate reports. And you can register the report with AWS Service such as S3 or DynamoDB. You can also use Slack or SES to get the report. Automation helps you.