Skip to content

Commit

Permalink
v1.1.6
Browse files Browse the repository at this point in the history
* Added support for AWS regions other than `us-east-1`
* Updated dependencies; fixed typo
  • Loading branch information
Rabold committed Aug 22, 2018
1 parent 93f5f0d commit b5befbb
Show file tree
Hide file tree
Showing 8 changed files with 439 additions and 481 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Andre Rabold
Copyright (c) 2017-2018 Andre Rabold

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
37 changes: 35 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,38 @@ package:

.PHONY: publish
publish:
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack/" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack/" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-us-east-2" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-us-east-1" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-us-west-1" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-us-west-2" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-northeast-2" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-south-1" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-southeast-1" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-southeast-2" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-northeast-1" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ca-central-1" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-eu-central-1" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-eu-west-1" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-eu-west-2" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-eu-west-3" --acl public-read
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-sa-east-1" --acl public-read
#@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-cn-north-1" --acl public-read
#@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-cn-northwest-1" --acl public-read

@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-us-east-2" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-us-east-1" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-us-west-1" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-us-west-2" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-northeast-2" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-south-1" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-southeast-1" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-southeast-2" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-northeast-1" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ca-central-1" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-eu-central-1" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-eu-west-1" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-eu-west-2" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-eu-west-3" --acl public-read
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-sa-east-1" --acl public-read
#@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-cn-north-1" --acl public-read
#@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-cn-northwest-1" --acl public-read
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,10 @@ Supported notification formats:
Additional formats will be added; Pull Requests are welcome!

## Try!
Ready to try it for yourself?
Ready to try it for yourself? Installation into your own AWS environment is as
simple as pressing the button below (for installation outside of `us-east-1` see details below):

**If you are in the us-east-1 AWS Region:**

Installation into your own AWS environment is as
simple as pressing the button below

[![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack/cloudformation.yaml)

**If you are not in the us-east-1 AWS Region**

Please refer to the installation instructions below
[![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-us-east-1/cloudformation.yaml)

## Installation

Expand All @@ -64,20 +56,28 @@ The Lambda function communicates with Slack through a Slack webhook

Note that the AWS region will be the region from which you launch the CloudFormation wizard, which will also scope the resources (SNS, etc.) to that region.

**If you are launching the CloudFormation Wizard for us-east-1 resources:**

Launch the CloudFormation Stack by using our preconfigured CloudFormation
[template](https://s3.amazonaws.com/aws-to-slack/cloudformation.yaml) or
[template](https://raw.githubusercontent.com/arabold/aws-to-slack/master/cloudformation.yaml) or
by simply pressing the following button:

[![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack/cloudformation.yaml)

**If you are not in the us-east-1 AWS Region:**
| Region | Launch Stack |
|--------|--------------|
| us-east-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-us-east-1/cloudformation.yaml) |
| us-east-2 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-us-east-2/cloudformation.yaml) |
| us-west-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-us-west-1/cloudformation.yaml) |
| us-west-2 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-us-west-2/cloudformation.yaml) |
| ap-northeast-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-ap-northeast-1/cloudformation.yaml) |
| ap-northeast-2 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-2#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-ap-northeast-2/cloudformation.yaml) |
| ap-south-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-south-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-ap-south-1/cloudformation.yaml) |
| ap-southeast-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-ap-southeast-1/cloudformation.yaml) |
| ap-southeast-2 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-ap-southeast-2/cloudformation.yaml) |
| ca-central-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=ca-central-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-ca-central-1/cloudformation.yaml) |
| eu-central-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-eu-central-1/cloudformation.yaml) |
| eu-west-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-eu-west-1/cloudformation.yaml) |
| eu-west-2 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-2#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-eu-west-2/cloudformation.yaml) |
| eu-west-3 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-3#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-eu-west-3/cloudformation.yaml) |
| sa-east-1 | [![Launch CloudFormation Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=sa-east-1#/stacks/new?stackName=aws-to-slack&templateURL=https://s3.amazonaws.com/aws-to-slack-sa-east-1/cloudformation.yaml) |

- Download the release.zip file and upload it so some AWS S3 Bucket (it only works with s3 URLs, plus the format must be `s3://your-bucket/path-to-file`.
- Give public access to this file in S3
- Make a copy of the cloudformation.yaml file, edit the s3 URL so that it points to your newly uploaded file s3 URL
- Go to the CloudFormation interface from you region (you can click one of the links above, but make sure to change the region to yours) then click on "upload from file" and send your modified `cloudformation.yaml` file

**Afterwards**

Expand Down
Binary file modified build/release.zip
Binary file not shown.
3 changes: 2 additions & 1 deletion cloudformation.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31

Expand All @@ -18,7 +19,7 @@ Resources:
Properties:
Handler: src/index.handler
Runtime: nodejs6.10
CodeUri: s3://aws-to-slack/release.zip
CodeUri: !Sub 's3://aws-to-slack-${AWS::Region}/release.zip'
MemorySize: 256
Timeout: 10
Policies: CloudWatchReadOnlyAccess
Expand Down
Loading

0 comments on commit b5befbb

Please sign in to comment.