### build
	sam build 
### create
	sam deploy --guided --config-env dev

			Configuring SAM deploy
			======================

				Looking for config file [samconfig.toml] :  Found
				Reading default arguments  :  Success

				Setting default arguments for 'sam deploy'
				=========================================
				Stack Name [sam-app]: sam-media-converter-dev
				AWS Region [us-east-1]: 
				Parameter SourceBucketName []: media-storage.dev.sizzl.com
				Parameter HlsBucketName []: media-converted.dev.sizzl.com 
				#Shows you resources changes to be deployed and require a 'Y' to initiate deploy
				Confirm changes before deploy [y/N]: y
				#SAM needs permission to be able to create roles to connect to the resources in your template
				Allow SAM CLI IAM role creation [Y/n]: y
				#Preserves the state of previously provisioned resources when an operation fails
				Disable rollback [y/N]: y
				Save arguments to configuration file [Y/n]: y
				SAM configuration file [samconfig.toml]:  
				SAM configuration environment [default]: dev

				Looking for resources needed for deployment:
				Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-1qy3q9bgh50nl
				A different default S3 bucket can be set in samconfig.toml

				Saved arguments to config file
				Running 'sam deploy' for future deployments will use the parameters saved above.
				The above parameters can be changed by modifying samconfig.toml
				Learn more about samconfig.toml syntax at 


				Outputs                                                                                
				-----------------------------------------------------------------------------------------------------------
				Key                 LambdaEdgeOtfVideoConvertVersion                                                      
				Description         Lambda@Edge on-the-fly Video Convert                                                  
				Value               arn:aws:lambda:us-east-1:478721825699:function:sam-media-converter-dev-               
				LambdaEdgeOtfVideoConvert-Qs8DJ6IB2IhP:1                                                                  

				Key                 SourceBucketName                                                                      
				Description         -                                                                                     
				Value               media-storage.dev.sizzl.com-478721825699                                              

				Key                 HlsBucketName                                                                         
				Description         -                                                                                     
				Value               media-converted.dev.sizzl.com-478721825699                                            

				Key                 DistributionEndPoint                                                                  
				Description         CloudFront Distribution Domain Name                                                   
				Value               https://d1upm5c71egu5y.cloudfront.net                    
			                                      
				-----------------------------------------------------------------------------------------------------------

				Successfully created/updated stack - sizzl-media-converter-dev in us-east-1


[Stage]  
	sam deploy --guided --config-env stage

	Outputs                                                                                                                                                                    
	----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	Key                 LambdaEdgeOtfVideoConvertVersion                                                                                                                       
	Description         Lambda@Edge on-the-fly Video Convert                                                                                                                   
	Value               arn:aws:lambda:us-east-1:478721825699:function:sam-media-converter-stage-LambdaEdgeOtfVideoConver-6oVC72DIyufo:1                                       

	Key                 SourceBucketName                                                                                                                                       
	Description         -                                                                                                                                                      
	Value               media-storage.stage.sizzl.com-478721825699                                                                                                             

	Key                 HlsBucketName                                                                                                                                          
	Description         -                                                                                                                                                      
	Value               media-converted.stage.sizzl.com-478721825699                                                                                                           

	Key                 DistributionEndPoint                                                                                                                                   
	Description         CloudFront Distribution Domain Name                                                                                                                    
	Value               https://d1w3a63my3q1ki.cloudfront.net                                                                                                                  
	----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

	Successfully created/updated stack - sam-media-converter-stage in us-east-1

[prod] sam deploy --guided --config-env prod
	Outputs                                                                                                                                                                    
	----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
	Key                 LambdaEdgeOtfVideoConvertVersion                                                                                                                       
	Description         Lambda@Edge on-the-fly Video Convert                                                                                                                   
	Value               arn:aws:lambda:us-east-1:478721825699:function:sam-media-converter-prod-LambdaEdgeOtfVideoConvert-mJaQem5MM44u:1                                       

	Key                 SourceBucketName                                                                                                                                       
	Description         -                                                                                                                                                      
	Value               media-storage.prod.sizzl.com-478721825699                                                                                                              

	Key                 HlsBucketName                                                                                                                                          
	Description         -                                                                                                                                                      
	Value               media-converted.prod.sizzl.com-478721825699                                                                                                            

	Key                 DistributionEndPoint                                                                                                                                   
	Description         CloudFront Distribution Domain Name                                                                                                                    
	Value               https://d1vt81pafxalk0.cloudfront.net                                                                                                                  
	----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

	Successfully created/updated stack - sam-media-converter-prod in us-east-1

### delete

sam delete --stack-name sizzl-media-converter-dev

## testing: 

### request on browser to create job
[dev]
	https://d1upm5c71egu5y.cloudfront.net/upload/library/user-id-2/intro/intro.m3u8?resolutions=540,720,1080&mediafilename=upload/library/user-id-2/intro.mp4
	
	https://d1upm5c71egu5y.cloudfront.net/upload/library/user-id-1/buildings-popping-up-on-a-street/buildings-popping-up-on-a-street.m3u8?resolutions=540,720,1080&mediafilename=upload/library/user-id-1/buildings-popping-up-on-a-street.mp4

[stage]
	https://d1w3a63my3q1ki.cloudfront.net/upload/library/user-id-1/buildings-popping-up-on-a-street-stage/buildings-popping-up-on-a-street-stage.m3u8?resolutions=540,720,1080&mediafilename=upload/library/user-id-1/buildings-popping-up-on-a-street-stage.mp4

### request on browser direct to file on cloudfront
[dev]
	https://d1upm5c71egu5y.cloudfront.net/upload/library/user-id-2/intro/intro.m3u8

	https://d1upm5c71egu5y.cloudfront.net/upload/library/user-id-1/buildings-popping-up-on-a-street/buildings-popping-up-on-a-street.m3u8

[stage]
	https://d1w3a63my3q1ki.cloudfront.net/upload/library/user-id-1/buildings-popping-up-on-a-street-stage/buildings-popping-up-on-a-street-stage.m3u8

### public lib
	1) purple-background-and-white-triangles
		- request & play : https://d1upm5c71egu5y.cloudfront.net/upload/library/480fa15f-4390-4ea6-910b-dc0084b03c8b/purple-background-and-white-triangles/purple-background-and-white-triangles.m3u8?resolutions=540,720,1080&mediafilename=upload/library/480fa15f-4390-4ea6-910b-dc0084b03c8b/purple-background-and-white-triangles.mp4 

		- play: https://d1upm5c71egu5y.cloudfront.net/upload/library/480fa15f-4390-4ea6-910b-dc0084b03c8b/purple-background-and-white-triangles/purple-background-and-white-triangles.m3u8

	2)	buildings-popping-up-on-a-street

		- request & play : https://d1upm5c71egu5y.cloudfront.net/upload/library/480fa15f-4390-4ea6-910b-dc0084b03c8b/buildings-popping-up-on-a-street/buildings-popping-up-on-a-street.m3u8?resolutions=540,720,1080&mediafilename=upload/library/480fa15f-4390-4ea6-910b-dc0084b03c8b/buildings-popping-up-on-a-street.mp4 

		- play: https://d1upm5c71egu5y.cloudfront.net/upload/library/480fa15f-4390-4ea6-910b-dc0084b03c8b/buildings-popping-up-on-a-street/buildings-popping-up-on-a-street.m3u8

		
		
