AWS

The AWS provider implements support for Amazon Web Services cloud provider.

Usage

The AWS provider is implemented as a plugin. To use it add the plugin to your init file. It uses the format @plugin: gyro:gyro-aws-provider:<version>.

@repository: 'https://artifactory.psdops.com/gyro-releases'
@plugin: 'gyro:gyro-aws-provider:0.99.0'

This lets Gyro load the AWS provider plugin and lets you start managing AWS resources using Gyro.

Authentication

This provider expects credentials to be provided using the same mechanism that the AWS CLI uses.

First, define your credentials in $HOME/.aws/credentials under a profile name of your chosing:

[my-project]
aws_secret_access_key = jIk7vCcAIm9zb0LPizhqjKrjGm7HF47VglVoFnjS
aws_access_key_id = IPPL6D4B4JCBO8HBIMJG

Then define these credentials in .gyro/init.gyro in your Gyro project along with the region you want to use these credentials in.

@credentials 'aws::credentials'
    profile-name: 'my-project'
    region: 'us-east-1'
@end

To use more than one region, provide a name for your credentials. When a name is not provided then the credentials because the default.

@credentials 'aws::credentials' us-east-2
    profile-name: 'my-project'
    region: 'us-east-2'
@end

To use a non-default set of credentials you must explicitly use them in your resource definitions:

aws::instance web-server
    instance-type: 't2.micro'

    @uses-credentials: 'us-east-2'
end