Amazon Web Services (AWS) Activities are now in Public Preview

Amazon Web Services (AWS) Activities are now in Public Preview

Update!

This activity is now available on the Official Stable Feed:

Description

UiPath.AmazonWebServices.Activities package offers activities for Amazon Web Services (AWS) cloud platform.

This initial set of 30+ activities enables IT Departments to easily automate important AWS S3 and AWS EC2 operations in their workflows like managing Buckets, Objects, and Instances.

S3 usage scenarios:

  • Build an infrastructure hosting multimedia files and allow the clients to download them.
  • Secure cloud storage for important documents (e.g. accounting reports).
  • Host application installers that clients can download.

EC2 usage scenarios:

  • Provision a new instance (e.g. for a new application deployment, DevOps, etc.).
  • Green computing & cost control (e.g. stop EC2 Instances that shouldn’t be running 24/7 to reduce cost).

Activities List

Cloud \ AWS

Amazon Web Services Scope – Connects to Amazon Web Services (AWS) and provides a scope for other AWS activities.

Cloud \ AWS \ S3 \ Buckets

Create Bucket – Creates a new S3 bucket. All public access to this bucket will be blocked by default.
Update Bucket Properties – Updates the properties of an existing bucket.
Configure Logging for Bucket – Configures the logging settings for the bucket.
Empty Bucket – Removes all the content of a bucket.
Delete Bucket – Deletes a bucket.
Get Bucket – Gets information about a specific bucket.
Get Bucket List – Gets the list of buckets in a specific region.
Configure Public Access to Bucket – Configures the public access for a bucket.
Get Bucket Policy – Gets the bucket policy.
Set Bucket Policy – Sets the bucket policy.
Delete Bucket Policy – Deletes the current bucket policy.

Cloud \ AWS \ S3 \ Objects

Get Object – Retrieves the details of the specified object.
Delete Single Object – Deletes the specified object.
Delete Multiple Objects – Deletes multiple objects at once.
Copy Object – Copies an object to another bucket.
Upload Object from File – Uploads a file to a bucket.
Upload Objects from Folder – Uploads an entire folder to a bucket.
Download Object to File – Downloads an object to a specified file.
For Each Object in Bucket - Performs an activity or a series of activities on each object in a specified bucket.
Set Object ACL – Sets the access control list (ACL) permissions for an object.
Get Object ACL – Gets the access control list (ACL) permissions for an object.

Cloud \ AWS \ EC2 \ Instances

Create Instance – Creates a new instance.
Create Instance from Launch Template - Creates a new instance from a launch template.
Get Instance by ID – Gets the details of the specified instance.
Get Instance List - Gets the list of instances matching the filter criteria.
Start Instance – Starts an instance.
Stop Instance – Stops an instance.
Reboot Instance – Reboots an instance.
Terminate Instance – Terminates an instance.
Configure Robot - Connects the Robot from a given instance to the UiPath Orchestrator.

How to install

UiPath.AmazonWebServices.Activities package is available in the Official feed, as a prerelease. In the Official feed, check ‘Include Prerelease’, search for “UiPath.AmazonWebServices.Activities”, and install the latest version.
** Important - We must reiterate, make sure you check the ‘Include Prerelease’ checkbox :blush:

AWS Activities should be visible now in UiPath Studio, as shown below:

How to use

The sample workflows below show how to use AWS activities in practice.

Secure Cloud Storage for Accounting Reports

This UiPath process contains three workflows:

  • AccountingFilesUploader : creates a new S3 bucket and uploads annual report files as objects.
  • AccountingFilesDownloader : downloads the reports objects for company “company1”.
  • VerifyAccountingFilesSecurity : verifies the reports objects cannot be accessed publicly if one has their Urls.

Updated UiPath process (using the Official AWS activities pack):
AWS-S3-SecureCloudStorage.zip (32.9 KB)

EC2 Instances Management

This UiPath process contains three workflows exemplifying how to create new EC2 instances, how to stop those instances which are not needed to be running 24/7 (to save money), and how to terminate instances.

  • CreateInstances : creates two EC2 instances. One has tag AlwaysOn = “False” and one has AlwaysOn = “True”.
  • StopInstances : stops all running instances with tag AlwaysOn = “False”.
  • DeleteInstances : terminates all instances created by me, i.e. tag Creator = “oviponocluj”.

Updated UiPath process (using the Official AWS activities pack):
AWS-EC2InstancesManagement.zip (22.1 KB)

To exemplify, let’s go step by step through the process of creating the StopInstances workflow:

  1. First, add Amazon Web Services Scope activity in order to connect to AWS and to provide a scope for other AWS activities. In AWS-EC2InstancesManagement.zip, Main.xaml workflow, you can see I got the values for these parameters from System Environment Variables and I passed them to StopInstances workflow. Amazon Web Services Scope activity has three mandatory input parameters:

  2. Then, let’s add a Get Instance List activity to obtain the list of EC2 instances which are not needed to be running 24/7. These instances have the value “False” for tag key AlwaysOn. In order to make the life of RPA developer easier, this activity allows some basic filtering options:

    • State (Enum) - Searches only for those instances having the specified state.

    • TagKey (String) - The key of the tag to filter by.

    • TagValue (String) - The value for the tag to filter by.

  3. Finally, add a For Each activity to perform a Stop Instance for each element in ec2InstanceList (the output parameter of Get Instance List activity). The TypeArgument for this activity shall be UiPath.AmazonWebServices.Models.AWSEc2Instance. For Stop Instance activity, set the value for Instance parameter to item .


That’s all folks! Enjoy :blush:

21 Likes

Great Uipath :star_struck:

2 Likes

Great work… :clap:

3 Likes

Is it compatible with older version of Uipath?

2 Likes

Hi @carmen.

This package is a completely new activities pack developed by IT Automation team @ UiPath. It will be available on the Official feed next week (this means we offer for it long term support, localization, enhancements, etc.)

There is no other AWS activities pack from UiPath on the Official feed. There is only a UiPath.Amazon.Scope.Activites pack on the Community which is a different one.

2 Likes

Hi,

When I am trying to connect with AWS S3 Bucket, I am able to connect to bucket however I cannot get object from the bucket. I am getting below error:
RemoteException wrapping UiPath.AmazonWebServices.Core.AWSException: Failed to get s3 object: Access Denied
Error: Access Denied —> RemoteException wrapping Amazon.S3.AmazonS3Exception: Access Denied —> RemoteException wrapping Amazon.Runtime.Internal.HttpErrorResponseException: The remote server returned an error: (403) Forbidden. —> RemoteException wrapping System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction,
Action1 endAction, Task1 promise,
Boolean requiresSynchronization)

From error, I can understand it is “Access Denied” however when I try to fetch the same object using HTTP Request in VerifyAccountingFilesSecurity.XAML from the current example, it is running successfully.

I assume, it could be an issue with the URL.

Awaiting your replies.

1 Like

Does anybody have any idea how to check the S3Object.URL with the provided activities?

@loginerror @ovidiuponoran can you please look into this issue?

@mrkrunaldoshi: my colleague Manas contacted you few hours ago (private message), he was asking for additional info.

Yes, I am in touch with Manas now. Thanks!

2 Likes

Hey everyone.

Loving the new S3 toolset! I’m trying to go through the samples but I’m having an issue with initializing the bucket variable for a single file upload. I’ve created a variable called “awsBucketName” and given it a type of AWSS3Bucket, but how do I assign the string that represents the bucket name to this variable? When I put quoted text into the bucket name field UiPath is giving me a compiler error.

In the sample code, you are creating a new bucket and using that created bucket name in the upload function…so I just need to know how to make this for for an existing bucket :slightly_smiling_face:

Screenshot below:

image

2 Likes

Hi @JoshB,

I’m glad you enjoy these activities.

In your situation, please first use Get Bucket activity to retrieve a AWSS3Bucket object. Then use this AWSS3Bucket object as input parameter in Upload Object from File.

Kind regards,
Ovidiu

1 Like

Is this available in Community edition?

@RajeshT, the activities package this forum post is talking about is called UiPath.AmazonWebServices.Activities. It is free of charge and can be downloaded from the Official feed.

2 Likes

Noted and Thank you @ovidiuponoran .

2 Likes

@ovidiuponoran Can you help me with the details on the GetBucket portion… I’ve added it in and when I try and run it I get the following error. Am I not specifying the bucket name in the right place? I am trying to upload to a specific folder inside of a bucket as shown in the screenshot below. I put in a dummy BUCKETNAME but in the code the real one exists :slight_smile:

The exception details are below.

image

RemoteException wrapping UiPath.AmazonWebServices.Core.AWSException: Failed to get the bucket details: Sequence contains no matching element
Error: Sequence contains no matching element —> RemoteException wrapping System.InvalidOperationException: Sequence contains no matching element
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at UiPath.AmazonWebServices.Services.S3BucketService.d__8.MoveNext()
— End of inner exception stack trace —
at UiPath.AmazonWebServices.Services.S3BucketService.d__8.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.AmazonWebServices.Activities.AWSActivity`1.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

1 Like

@JoshB: you cannot have “/” in the name of a bucket, AWS S3 does not allow such thing.
My guess is the name of your bucket is “bucketname” and “name_check_data/screen_captures” is the prefix (folder) where you want to upload the object / where your object is located. So please use only the exact bucket name in “Get Bucket” activity.

1 Like

@mrkrunaldoshi, @ovidiuponoran Making a note here. The issue got resolved once IAM user had ListBucketVersions permissions.

Thanks,
Manas

2 Likes

@manaspandey, however as we are on a growing path, we should integrate “ListObjectsRequest” method in upcoming versions of the package. Also, we need to give specific rights of “ListBucketVersions” to that particular IAM user. In my case, we had all the rights but still, it didn’t work however when we specifically gave this particular right, it started working.

3 Likes

I think ListVersions is more generic. There might be cases where users are interested in VersionsInfo, by setting the IncludeVersionsInfo in the “Get Object” activity.

2 Likes