runway.core.providers.aws package

Runway AWS objects.

class runway.core.providers.aws.AccountDetails(context)[source]

Bases: object

AWS account details.

Instantiate class.

Parameters

context – Runway context object.

aliases

Decorator for creating cached properties.

A property that is only computed once per instance and then replaces itself with an ordinary attribute. Deleting the attribute resets the property. Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76

id

Decorator for creating cached properties.

A property that is only computed once per instance and then replaces itself with an ordinary attribute. Deleting the attribute resets the property. Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76

class runway.core.providers.aws.AssumeRole(context, role_arn=None, duration_seconds=None, revert_on_exit=True, session_name=None)[source]

Bases: contextlib.AbstractContextManager

Context manager for assuming an AWS role.

Instantiate class.

Parameters
  • context (Context) – Runway context object.

  • role_arn (Optional[str]) – ARN of role to be assumed.

  • duration_seconds (Optional[int]) – Seconds that the assumed role’s credentials will be valid for. (default: 3600)

  • revert_on_exit (bool) – Whether credentials in the environment will be reverted upon exiting the context manager.

  • session_name (Optional[bool]) – Name to use for the assumed role session. (default: runway)

assume()[source]

Perform role assumption.

restore_existing_iam_env_vars()[source]

Restore backed up IAM environment variables.

save_existing_iam_env_vars()[source]

Backup IAM environment variables for later restoration.

class runway.core.providers.aws.BaseResponse(**kwargs)[source]

Bases: object

Analyse the response from AWS S3 HeadBucket API response.

error

Information about a service or networking error.

Type

ResponseError

metadata

Information about the request.

Type

ResponseMetadata

Instantiate class.

Keyword Arguments
  • Error – Information about a service or networking error.

  • ResponseMetadata – Information about the request.

class runway.core.providers.aws.ResponseError(**kwargs)[source]

Bases: object

Analyse the response from AWS S3 HeadBucket API response.

code

A unique short code representing the error that was emitted.

Type

str

message

A longer human readable error message.

Type

str

Instantiate class.

Keyword Arguments
  • Code (str) – A unique short code representing the error that was emitted.

  • Message (str) – A longer human readable error message.

class runway.core.providers.aws.ResponseMetadata(**kwargs)[source]

Bases: object

Analyse the response from AWS S3 HeadBucket API response.

host_id

Host ID data.

Type

Optional[str]

https_headers

A map of response header keys and their respective values.

Type

Dict[str, Any]

http_status_code

The HTTP status code of the response (e.g., 200, 404).

Type

int

request_id

The unique request ID associated with the response. Log this value when debugging requests for AWS support.

Type

Optional[str]

retry_attempts

The number of retries that were attempted before the request was completed.

Type

int

Instantiate class.

Keyword Arguments
  • HostId (str) – Host ID data.

  • HTTPHeaders (Dict[str, Any]) – A map of response header keys and their respective values.

  • HTTPStatusCode (int) – The HTTP status code of the response (e.g., 200, 404).

  • RequestId (str) – The unique request ID associated with the response. Log this value when debugging requests for AWS support.

  • RetryAttempts (int) – The number of retries that were attempted before the request was completed.

property forbidden

Whether the response returned 403 (forbidden).

property not_found

Whether the response returned 404 (Not Found).

runway.core.providers.aws.cli(cmd)[source]

Invoke AWS command.

Parameters

cmd – Command to be passed to awscli.

Raises

RuntimeError – awscli returned a non-zero exit code.