Skip to main content

CloudFormation aware aws cli wrapper.

Project description

pronounced /ˈɒzi/ oz-ee like our great friends from down under.

AWSIE is a CloudFormation aware wrapper on top of the AWS cli. It help you to call an awscli command, but instead of the actual physical ID of the resource you set the logical CloudFormation template id which will be replaced then.

For many different resources AWS can automatically set a random name when creating the resource through Cloudformation. While this has a big upside with resources not clashing when the same stack gets deployed multipe times, a downside is that running a command against a specific resource means you have to write lookup code or use the resource name by hand.

Awsie helps you to do that lookup and call the awscli without any potential for clashes.

Installation

Before installing make sure you have the awscli installed as awsie depends on it. We don’t install it ourselves so you’re able to install the exact version you want to use.

pip install awscli

awsie can be installed through pip:

pip install awsie

Alternatively you can clone this repository and run

python setup.py install

Quick example

For example when you deploy a CloudFormation stack:

{
    "Resources": {
        "DeploymentBucket": {
            "Type": "AWS::S3::Bucket"
        }
    }
}

and then want to list the content of the bucket you can use awsie:

awsie example-stack s3 ls s3://cf:DeploymentBucket: --region us-west-1

or if you want to remove somefile from the DeploymentBucket:

awsie example-stack s3 rm s3://cf:DeploymentBucket:/somefile --region us-west-1

which will replace cf:DeploymentBucket: with the actual name of the resource and run the awscli with all arguments you passed to awsie, except for the stack-name (which has to be the first argument):

aws s3 ls s3://formica-example-stack-deploymentbucket-1jjzisylxreh9 --region us-west-1
aws s3 rm s3://formica-example-stack-deploymentbucket-1jjzisylxreh9/somefile --region us-west-1

Replacement syntax

The replacement syntax is cf:LOGICAL_ID: and will replace LOGICAL_ID with the PhysicalId of the resource through the data returned from list-stack-resources.

Options

awsie STACK_NAME

  • stack Has to be the first positional argument and will be removed from call to the AWS cli.

  • --profile PROFILE The AWS profile to use for the CloudFormation lookup, will be passed to the aws cli.

  • --region REGION The AWS region to use for the CloudFormation lookup, will be passed to the aws cli.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awsie-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

awsie-0.1.0-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file awsie-0.1.0.tar.gz.

File metadata

  • Download URL: awsie-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for awsie-0.1.0.tar.gz
Algorithm Hash digest
SHA256 85395cc1b46fbf24b35852193680f9966e4e2f80289e9a0d4b004a0a552fb39d
MD5 c4a4999e656e405086e2e6b73638eea3
BLAKE2b-256 e41ef76593a0606be33f8e7813417cd610735c20320d2eba16705c84f34336c6

See more details on using hashes here.

File details

Details for the file awsie-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for awsie-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b9bc4ab71f0276bea704681bebabdc0a9b033397962096ad00ac1c0a606ee9b1
MD5 e33f0431f383637f483d50e3d0a37838
BLAKE2b-256 9fff55b465428df0636fcfb14d62e0ec7b683389b89b3d9be9ab75b090add4f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page