- AWS re:Invent 2018: [REPEAT 2] Optimizing Your Serverless Applications (SRV401-R2)
- Default to 1024 MB Lambda functions for cost and runtime optimization
- Lambda functions with over 1.8 GB is multi core
- Using AWS Lambda with Other Services
- Example events from other services
Last active
March 26, 2020 19:42
-
-
Save neverendingqs/8e129356fe9774169df5bcb8742ee3f4 to your computer and use it in GitHub Desktop.
AWS Notes
This file contains 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
# aws --profile <profile> --region ca-central-1 cloudformation deploy --stack-name <stack-name> --capabilities CAPABILITY_IAM --template-file single-ec2.yaml --parameter-overrides "KeyName=<keyname>" "IamInstanceProfileRole=<arn>" | |
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Parameters: | |
KeyName: | |
Type: AWS::EC2::KeyPair::KeyName | |
IamInstanceProfileRole: | |
Description: Expects an ARN | |
Type: String | |
ImageId: | |
Type: AWS::EC2::Image::Id | |
Default: ami-0bf54ac1b628cf143 | |
InstanceType: | |
Type: String | |
Default: t2.medium | |
Resources: | |
Instance: | |
Type: AWS::EC2::Instance | |
Properties: | |
IamInstanceProfile: | |
Ref: InstanceProfile | |
InstanceType: | |
Ref: InstanceType | |
SecurityGroups: | |
- Ref: InstanceSecurityGroup | |
KeyName: | |
Ref: KeyName | |
ImageId: | |
Ref: ImageId | |
InstanceProfile: | |
Type: AWS::IAM::InstanceProfile | |
Properties: | |
Roles: | |
- Ref: InstanceProfileRole | |
InstanceProfileRole: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' | |
Statement: | |
Effect: Allow | |
Principal: | |
Service: | |
- ec2.amazonaws.com | |
Action: | |
- sts:AssumeRole | |
ManagedPolicyArns: | |
- arn:aws:iam::aws:policy/AdministratorAccess | |
InstanceSecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
GroupDescription: Security group for EC2 instance | |
SecurityGroupIngress: | |
- IpProtocol: tcp | |
FromPort: '22' | |
ToPort: '22' | |
CidrIp: 0.0.0.0/0 | |
Outputs: | |
InstancePublicDns: | |
Value: | |
!GetAtt Instance.PublicDnsName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment