https://github.com/metaskills/image_service
757rb Image Service
https://github.com/metaskills/image_service
Last synced: about 1 month ago
JSON representation
757rb Image Service
- Host: GitHub
- URL: https://github.com/metaskills/image_service
- Owner: metaskills
- Created: 2020-04-09T22:38:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T00:59:54.000Z (over 5 years ago)
- Last Synced: 2025-08-02T20:05:12.985Z (2 months ago)
- Language: Ruby
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ImageService
Welcome to your new Lambda project! This was created by Custom Ink's demo AWS SAM Cookiecutter project template for Ruby. [See the full article here on Custom Ink's technology blog](https://technology.customink.com/blog/2020/03/13/using-aws-sam-cookiecutter-project-templates-to-kickstart-your-ambda-projects/).
**[Lamby: Simple Rails & AWS Lambda Integration using Rack.](https://lamby.custominktech.com)**
## Setup
Follow these steps to get started:
```shell
$ ./bin/bootstrap
$ ./bin/setup
$ ./bin/test
```To deploy your Lambda do the following. This command assumes you have the AWS CLI configured with credentials located within your `~/.aws` directory.
```shell
$ STAGE_ENV=production ./bin/deploy
```To test it works within the AWS Console, you can either send it a test event (Services -> Lambda -> MYLAMBDA -> Test) or if you opted for a basic HTTP API, you can see your Invoke URL by navigating to (Services -> API Gateway -> MYAPI -> Invoke URL) page.
## CI/CD with GitHub Actions
In order for GitHub to deploy your Lambda, it will need permission to do so. An admin should do the first deploy, however afterward GitHub Actions can do updates for you.
#### Create a Deploy User
In the AWS Console -> IAM -> Users -> Add User.
* Check "Programmatic access" option.
* Select "Attach existing policies directly" option.
* Select "AWSLambdaFullAccess" policy.
* Copy the "Access key ID" and "Secret access key"#### AWS Credentials
In your GitHub repo page. Click Settings -> Secrets -> Add a new secret
* Name `AWS_ACCESS_KEY_ID` value (from step above)
* Name `AWS_SECRET_ACCESS_KEY` value (from step above)