- AWS Lambda@Edge (enabled Preview)
- One Amazon CloudFront Distribution (origin doesn't matter)
- IAM role (basic execution is enough)
- npm to install Node.js dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resources: | |
WorkshopKinesisStream: | |
Type: "AWS::Kinesis::Stream" | |
Properties: | |
ShardCount: 1 | |
IdentityPool: | |
Type: "AWS::Cognito::IdentityPool" | |
Properties: | |
IdentityPoolName: WorkshopIdentityPool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from boto3.session import Session | |
session = Session(aws_access_key_id='AWS_ACCESS_KEY_ID', aws_secret_access_key='AWS_SECRET_ACCESS_KEY') | |
machinelearning = session.client('machinelearning', region_name='us-east-1') | |
labels = {'1': 'walking', '2': 'walking upstairs', '3': 'walking downstairs', '4': 'sitting', '5': 'standing', '6': 'laying'} | |
# fill your model ID and Endpoint here! | |
model_id = 'MODEL_ID' | |
prediction_endpoint = 'MODEL_ENDPOINT' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"https://twitter.com//goserverless/status/879729046568882177", | |
"https://twitter.com//zdne/status/879726263417663490", | |
"https://twitter.com//jeffconf/status/879722357899894785", | |
"https://twitter.com//AzureFunctions/status/879458907453767680", | |
"https://twitter.com//adampash/status/877549817471279105", | |
"https://twitter.com//MongoDB/status/877186132404031488", | |
"https://twitter.com//alex_casalboni/status/875866754177748993", | |
"https://twitter.com//gmolto/status/872691887936811008", | |
"https://twitter.com//jeffconf/status/872451904642703360", |
For each record read from the Kinesis Stream, a StepFunction state machine will be executed asynchronously.
- region: the AWS region where your StepFunction state machine is defined.
- stateMachineArn: the ARN of the StepFunction state machine you want to execute.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
iam = boto3.resource('iam') | |
def get_policy_body(arn, version_id=None): | |
""" Return IAM Policy JSON body """ | |
if version_id: | |
version = iam.PolicyVersion(arn, version_id) | |
else: | |
policy = iam.Policy(arn) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BUCKET="YOUR_BUCKET_NAME" # bucket name | |
FILENAME="deployment-package.zip" # upload key | |
TMP_FOLDER="/tmp/lambda-env-tmp/" # will be cleaned | |
OUTPUT_FOLDER="/tmp/lambda-env/" # will be cleaned | |
HERE=${BASH_SOURCE%/*} # relative path to this file's folder | |
LAMBDA_FOLDER="$HERE/lambda/" # relative path |
AWS Lambda: Advanced Coding Session (slides)
Live demos:
- Amazon API Gateway Access Control
- Amazon Kinesis Streams processing
- Amazon Cognito Sync trigger
- AWS CloudFormation Custom Resources
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
Index: