Skip to content

Commit b5befbb

Browse files
author
Rabold
committed
v1.1.6
* Added support for AWS regions other than `us-east-1` * Updated dependencies; fixed typo
1 parent 93f5f0d commit b5befbb

File tree

8 files changed

+439
-481
lines changed

8 files changed

+439
-481
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Andre Rabold
3+
Copyright (c) 2017-2018 Andre Rabold
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

+35-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,38 @@ package:
2727

2828
.PHONY: publish
2929
publish:
30-
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack/" --acl public-read
31-
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack/" --acl public-read
30+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-us-east-2" --acl public-read
31+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-us-east-1" --acl public-read
32+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-us-west-1" --acl public-read
33+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-us-west-2" --acl public-read
34+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-northeast-2" --acl public-read
35+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-south-1" --acl public-read
36+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-southeast-1" --acl public-read
37+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-southeast-2" --acl public-read
38+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ap-northeast-1" --acl public-read
39+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-ca-central-1" --acl public-read
40+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-eu-central-1" --acl public-read
41+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-eu-west-1" --acl public-read
42+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-eu-west-2" --acl public-read
43+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-eu-west-3" --acl public-read
44+
@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-sa-east-1" --acl public-read
45+
#@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-cn-north-1" --acl public-read
46+
#@"$(AWS_CLI)" s3 cp "./cloudformation.yaml" "s3://aws-to-slack-cn-northwest-1" --acl public-read
47+
48+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-us-east-2" --acl public-read
49+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-us-east-1" --acl public-read
50+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-us-west-1" --acl public-read
51+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-us-west-2" --acl public-read
52+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-northeast-2" --acl public-read
53+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-south-1" --acl public-read
54+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-southeast-1" --acl public-read
55+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-southeast-2" --acl public-read
56+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ap-northeast-1" --acl public-read
57+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-ca-central-1" --acl public-read
58+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-eu-central-1" --acl public-read
59+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-eu-west-1" --acl public-read
60+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-eu-west-2" --acl public-read
61+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-eu-west-3" --acl public-read
62+
@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-sa-east-1" --acl public-read
63+
#@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-cn-north-1" --acl public-read
64+
#@"$(AWS_CLI)" s3 cp "$(RELEASE_ZIP)" "s3://aws-to-slack-cn-northwest-1" --acl public-read

README.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,10 @@ Supported notification formats:
3131
Additional formats will be added; Pull Requests are welcome!
3232

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

36-
**If you are in the us-east-1 AWS Region:**
37-
38-
Installation into your own AWS environment is as
39-
simple as pressing the button below
40-
41-
[![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)
42-
43-
**If you are not in the us-east-1 AWS Region**
44-
45-
Please refer to the installation instructions below
37+
[![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)
4638

4739
## Installation
4840

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

6557
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.
6658

67-
**If you are launching the CloudFormation Wizard for us-east-1 resources:**
68-
6959
Launch the CloudFormation Stack by using our preconfigured CloudFormation
70-
[template](https://s3.amazonaws.com/aws-to-slack/cloudformation.yaml) or
60+
[template](https://raw.githubusercontent.com/arabold/aws-to-slack/master/cloudformation.yaml) or
7161
by simply pressing the following button:
7262

73-
[![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)
74-
75-
**If you are not in the us-east-1 AWS Region:**
63+
| Region | Launch Stack |
64+
|--------|--------------|
65+
| 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) |
66+
| 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) |
67+
| 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) |
68+
| 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) |
69+
| 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) |
70+
| 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) |
71+
| 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) |
72+
| 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) |
73+
| 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) |
74+
| 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) |
75+
| 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) |
76+
| 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) |
77+
| 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) |
78+
| 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) |
79+
| 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) |
7680

77-
- 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`.
78-
- Give public access to this file in S3
79-
- Make a copy of the cloudformation.yaml file, edit the s3 URL so that it points to your newly uploaded file s3 URL
80-
- 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
8181

8282
**Afterwards**
8383

build/release.zip

188 Bytes
Binary file not shown.

cloudformation.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
AWSTemplateFormatVersion: '2010-09-09'
23
Transform: AWS::Serverless-2016-10-31
34

@@ -18,7 +19,7 @@ Resources:
1819
Properties:
1920
Handler: src/index.handler
2021
Runtime: nodejs6.10
21-
CodeUri: s3://aws-to-slack/release.zip
22+
CodeUri: !Sub 's3://aws-to-slack-${AWS::Region}/release.zip'
2223
MemorySize: 256
2324
Timeout: 10
2425
Policies: CloudWatchReadOnlyAccess

0 commit comments

Comments
 (0)