runway.core.providers.aws package

Runway AWS objects.

class runway.core.providers.aws.AccountDetails(context: Union[CfnginContext, RunwayContext])[source]

Bases: object

AWS account details.

Instantiate class.

Parameters

context – Runway context object.

aliases

Get the aliases of the AWS account.

id

Get the ID of the AWS account.

class runway.core.providers.aws.AssumeRole(*args, **kwds)[source]

Bases: contextlib.AbstractContextManager, typing.Generic

Context manager for assuming an AWS role.

Instantiate class.

Parameters
  • context – Runway context object.

  • role_arn – ARN of role to be assumed.

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

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

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

assume()None[source]

Perform role assumption.

assumed_role_user: AssumedRoleUserTypeDef
credentials: CredentialsTypeDef
ctx: RunwayContext
duration_seconds: int
restore_existing_iam_env_vars()None[source]

Restore backed up IAM environment variables.

revert_on_exit: bool
save_existing_iam_env_vars()None[source]

Backup IAM environment variables for later restoration.

session_name: str = 'runway'
class runway.core.providers.aws.BaseResponse(**kwargs: Any)[source]

Bases: object

Analyse the response from AWS S3 HeadBucket API response.

error

Information about a service or networking error.

metadata

Information about the request.

Instantiate class.

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

  • ResponseMetadata – Information about the request.

class runway.core.providers.aws.ResponseError(*, Code: str = '', Message: str = '')[source]

Bases: object

Analyse the response from AWS S3 HeadBucket API response.

code

A unique short code representing the error that was emitted.

message

A longer human readable error message.

Instantiate class.

Parameters
  • Code – A unique short code representing the error that was emitted.

  • Message – A longer human readable error message.

class runway.core.providers.aws.ResponseMetadata(*, HostId: Optional[str] = None, HTTPHeaders: Optional[Dict[str, Any]] = None, HTTPStatusCode: int = 200, RequestId: Optional[str] = None, RetryAttempts: int = 0)[source]

Bases: object

Analyse the response from AWS S3 HeadBucket API response.

host_id

Host ID data.

https_headers

A map of response header keys and their respective values.

http_status_code

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

request_id

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

retry_attempts

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

Instantiate class.

Keyword Arguments
  • HostId – Host ID data.

  • HTTPHeaders – A map of response header keys and their respective values.

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

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

  • RetryAttempts – 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).