https://github.com/mlabouardy/alldaydevops-2018
AllDayDevOps 2018 :cloud:
https://github.com/mlabouardy/alldaydevops-2018
alexa aws cloud containers devops lambda serverless
Last synced: about 1 year ago
JSON representation
AllDayDevOps 2018 :cloud:
- Host: GitHub
- URL: https://github.com/mlabouardy/alldaydevops-2018
- Owner: mlabouardy
- Created: 2018-10-12T17:33:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-17T14:55:03.000Z (over 7 years ago)
- Last Synced: 2025-01-15T18:41:03.135Z (about 1 year ago)
- Topics: alexa, aws, cloud, containers, devops, lambda, serverless
- Language: Go
- Homepage:
- Size: 127 KB
- Stars: 0
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Talk
[](https://youtu.be/lXU2GbstE_4?t=5414)
# Setup
```
$ ./build.sh
$ cd terrafrom && terraform init && terraform apply
```
# Lambda Functions
## Create Infrastructure
### Environment Variables
- AMI
- KEYPAIR
- SSM_ROLE_NAME
- SECURITY_GROUP_ID
- SQS_URL
- TABLE_NAME
### IAM Policy
```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "1",
"Effect": "Allow",
"Action": [
"iam:PassRole",
"dynamodb:PutItem",
"dynamodb:Scan",
"sqs:SendMessage",
"sqs:SetQueueAttributes"
],
"Resource": [
"arn:aws:sqs:AWS_REGION:ACCOUNT_ID:clusters",
"arn:aws:iam::ACCOUNT_ID:role/SwarmClusterSSMRole",
"arn:aws:dynamodb:AWS_REGION:ACCOUNT_ID:table/clusters"
]
},
{
"Sid": "2",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"ec2:CreateTags",
"ec2:RunInstances",
"logs:CreateLogGroup",
"logs:PutLogEvents",
"ssm:SendCommand",
"ssm:GetCommandInvocation"
],
"Resource": "*"
}
]
}
```
## Provision Infrastructure
### Environment Variables
- SQS_URL
- TABLE_NAME
### IAM Policy
```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "1",
"Effect": "Allow",
"Action": [
"sqs:*",
"dynamodb:UpdateItem"
],
"Resource": [
"arn:aws:sqs:AWS_REGION:ACCOUNT_ID:clusters",
"arn:aws:dynamodb:AWS_REGION:ACCOUNT_ID:table/clusters"
]
},
{
"Sid": "2",
"Effect": "Allow",
"Action": [
"ssm:SendCommand",
"logs:CreateLogStream",
"logs:CreateLogGroup",
"logs:PutLogEvents",
"ssm:GetCommandInvocation"
],
"Resource": "*"
}
]
}
```
# Maintainers
Mohamed Labouardy