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
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/complete_auto_scaling_lifecycle": | |
mode: "000755" | |
owner: "root" | |
group: "root" | |
content: | | |
#!/bin/bash | |
INSTANCE_ID=`curl http://169.254.169.254/latest/meta-data/instance-id 2>/dev/null` | |
REGION=`curl -s http://169.254.169.254/latest/dynamic/instance-identity/document 2>/dev/null | jq -r .region` | |
# Find the Auto Scaling Group name from the Elastic Beanstalk environment |
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
Resources: | |
lifecyclehook: | |
Type: AWS::AutoScaling::LifecycleHook | |
Properties: | |
AutoScalingGroupName: { "Ref" : "AWSEBAutoScalingGroup" } | |
LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING | |
LifecycleHookName: { "Ref" : "AWSEBAutoScalingGroup" } |
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
import boto3 | |
from rest_framework import status | |
from rest_framework.response import Response | |
from rest_framework.views import APIView | |
class GenerateAwsSignature(APIView): | |
"""Generate an AWS signature for presigned POST requests. | |
This signed data allows file uploads directly from the browser to S3. |
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
import { Component, AfterViewInit, OnInit } from '@angular/core'; | |
import { s3 } from 'fine-uploader/lib/core/s3'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent implements AfterViewInit{ |