Skip to content

Commit d725d89

Browse files
committed
Merge pull request #54 from iron-io/aws-import-docs
Add doc for ironcli aws-import subcommand.
2 parents 1b1a3d3 + e6e9a54 commit d725d89

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

docs/import.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Import existing AWS Lambda functions
2+
====================================
3+
4+
The [ironcli](https://github.com/iron-io/ironcli/) tool includes a set of
5+
commands to act on Lambda functions. Most of these are described in
6+
[getting-started](./getting-started.md). One more subcommand is `aws-import`.
7+
8+
If you have an existing AWS Lambda function, you can use this command to
9+
automatically convert it to a Docker image that is ready to be deployed on
10+
other platforms.
11+
12+
### Credentials
13+
14+
To use this, either have your AWS access key and secret key set in config
15+
files, or in environment variables. In addition, you'll want to set a default
16+
region. You can use the `aws` tool to set this up. Full instructions are in the
17+
[AWS documentation][awscli].
18+
19+
[awscli]: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files
20+
21+
### Importing
22+
23+
Assuming you have a lambda function named `my-function`, the following command:
24+
25+
```sh
26+
ironcli lambda aws-import my-function
27+
```
28+
29+
will import the function code to a directory called `./my-function`. It will
30+
then create a docker image called `my-function`.
31+
32+
If you only want to download the code, pass the `-download-only` flag. The
33+
`-region` and `-profile` flags are available similar to the `aws` tool to help
34+
you tweak the settings on a command level. If you want to call the docker image
35+
something other than `my-function`, pass the `-image <new name>` flag. Finally,
36+
you can import a different version of your lambda function than the latest one
37+
by passing `-version <version>.`

docs/introduction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ guide](./getting-started.md). [Here is the environment](./environment.md) that
4141
Lambda provides. `ironcli lambda` lists the commands to work with Lambda
4242
functions locally.
4343

44+
You can [import](./import.md) existing Lambda functions hosted on Amazon!
4445
The Docker environment required to run Lambda functions is described
4546
[here](./docker.md).
4647

0 commit comments

Comments
 (0)