RPA.Cloud.AWS
AWS is a library for operating with Amazon AWS services S3, SQS, Textract and Comprehend.
Services are initialized with keywords like Init S3 Client for S3.
AWS authentication
Authentication for AWS is set with key id and access key which can be given to the library in three different ways.
- Method 1 as environment variables, AWS_KEY_ID and AWS_KEY.
- Method 2 as keyword parameters to Init Textract Client for example.
- Method 3 as Robocorp vault secret. The vault name needs to be given in library init or with keyword Set Robocorp Vault. Secret keys are expected to match environment variable names.
Note. Starting from rpaframework-aws 1.0.3 region can be given as environment variable AWS_REGION or include as Robocorp Vault secret with the same key name.
Redshift Data authentication: Depending on the authorization method, use one of the following combinations of request parameters, which can only be passed via method 2:
- Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.
- Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials operation is required. When connecting to a serverless endpoint, specify the database name.
Role Assumption: With the use of the STS service client, you are able to assume another role, which will return temporary credentials. The temporary credentials will include an access key and session token, see keyword documentation for Assume Role for details of how the credentials are returned. You can use these temporary credentials as part of method 2, but you must also include the session token.
Method 1. credentials using environment variable
Method 2. credentials with keyword parameter
Method 3. setting Robocorp Vault in the library init
Method 3. setting Robocorp Vault with keyword
Requirements
The default installation depends on boto3 library. Due to the size of the dependency, this library is available separate package rpaframework-aws but can also be installed as an optional package for rpaframework.
Recommended installation is rpaframework-aws plus rpaframework package. Remember to check latest versions from rpaframework Github repository.
Example
Importing
Initialize self. See help(type(self)) for accurate signature.