mkdir policy-test
cd policy-test
aws ecr create-repository --repository-name {REPO}
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetObject", | |
"s3:ListAllMyBuckets", | |
"s3:ListBucket", |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets", | |
"s3:ListBucket", | |
"s3:HeadBucket" |
var AWS = require('aws-sdk'); | |
const TASK_ID = 'arc-jupyter-task:9' | |
const CLUSTER_NAME = 'arc-cluster'; | |
const SUBNET_ID = 'subnet-0e33c61112aa5ed1a'; | |
const NAME = 'arc-jupyter' | |
exports.handler = function (event, context, callback) { | |
// Each time this lambda function is triggered from an event (probably S3), |
Flask |
FROM python:2.7.15-alpine3.7 | |
COPY . /app | |
WORKDIR /app | |
RUN pip install -r requirements.txt | |
ENTRYPOINT ["python"] | |
CMD ["app.py"] |
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello, World from Python!' | |
if __name__ == '__main__': | |
app.run(debug=True,host='0.0.0.0',port=8000) |
{ | |
"Name": "CodeCommitRule", | |
"EventPattern": "{\"source\": [ \"aws.codecommit\" ],\"detail-type\": [ \"CodeCommit Repository State Change\" ],\"resources\": [ \"<arn_of_codecommit_repo>\" ],\"detail\": {\"event\": [\"referenceCreated\",\"referenceUpdated\"],\"referenceType\":[\"branch\"],\"referenceName\": [\"master\"]}}", | |
"State": "ENABLED" | |
} |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"codepipeline:StartPipelineExecution" | |
], | |
"Resource": [ | |
"*" |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"Service": "events.amazonaws.com" | |
}, | |
"Action": "sts:AssumeRole" | |
} |