How to delete all files from S3 Bucket by using command line

It is not obvious how to delete all files (including sub-folders) if you read AWS CLI S3 documentation. But there is a trick by using AWS S3 sync command cd ANY_EMPTY_FOLDER_ON_YOU_COMPUTER aws s3 sync . s3://YOUR-BUCKET-NAME –delete Be careful! This effectively will empty your AWS S3 Bucket completely. You can do the same for nestedContinue reading “How to delete all files from S3 Bucket by using command line”

AWS re:Invent Feature Request

Recently,  I went to AWS re:Invent 2018 for the second time. My first time was back in 2014 (when AWS Lambda was introduced). This time I decided to go to Las Vegas with my wife. So I did purchased a guest pass to AWS re:Play event. re:play itself was great. Highly recommend to attend itContinue reading “AWS re:Invent Feature Request”

AWS Lambda errors you don’t want to see

Just want to make a not for myself regarding the errors you might get in case of AWS outage or service degradation. It is what we got on June 22, 2017. We currently do not have sufficient capacity in the region you requested. { “errorMessage”: “We currently do not have sufficient capacity in the regionContinue reading “AWS Lambda errors you don’t want to see”

Silent IIS UrlRewrite, ARR and FARM provisioning by #PowerShell

Recently, I had the task to run several fitnesse instances in on the single AWS EC2 instance. The requirement was what each fitnesse instance should be accessible trough port 80 (HTTP). IIS as reverse proxy came to the rescue. But there were one more requirement – IIS Reverse Proxy configuration should be automated. Here >> konstantinvlasenko/IISContinue reading “Silent IIS UrlRewrite, ARR and FARM provisioning by #PowerShell”

Prepare your Amazon Linux for Sencha ExtJS 6.0 development

install unzip install java download ExtJS 6.0 GPL download SenchaCMD 6.0 unzip SenchaCMD unzip ExtJS 6.0 install SenchaCMD logout/login sudo yum install unzip sudo yum install java-1.7.0-openjdk curl http://cdn.sencha.com/ext/gpl/ext-6.0.0-gpl.zip -o ext-6.0.0-gpl.zip curl http://cdn.sencha.com/cmd/6.0.0.202/no-jre/SenchaCmd-6.0.0.202-linux-amd64.sh.zip -o SenchaCmd-6.0.0.202-linux-amd64.sh.zip unzip SenchaCmd-6.0.0.202-linux-amd64.sh.zip unzip ext-6.0.0-gpl.zip ./SenchaCmd-6.0.0.202-linux-amd64.sh Apache proxy for sencha app watch sudo yum -y install httpd sudo service httpd startContinue reading “Prepare your Amazon Linux for Sencha ExtJS 6.0 development”

Howto register AWS SAML metadata in SimpleSAMLphp

There is the page Configuring a Relying Party and Adding Claims. It explains how to get AWS metadata https://signin.aws.amazon.com/static/saml-metadata.xml Go to you SimpleSAMLphp Federation tab Click on XML to simpleSAMLphp metadata converter link Copy content of https://signin.aws.amazon.com/static/saml-metadata.xml Paste it into Metadata parser window. Click Parse button. Copy Converted metadata content Paste into Noteapd Add Auth Procc Filter (mentioned at https://groups.google.com/forum/#!topic/simplesamlphp/AgHEy-5vHdA) ‘authproc’ =>Continue reading “Howto register AWS SAML metadata in SimpleSAMLphp”

Howto install AWS CodeDeploy on EC2 Windows instance by using CloudInit

Create user-data.txt file ————– <powershell> New-Item -ItemType Directory -Force -Path c:\temp Read-S3Object -BucketName aws-codedeploy-us-east-1/latest -Key codedeploy-agent.msi -File c:\temp\codedeploy-agent.msi start c:\temp\codedeploy-agent.msi ‘/qn /l*v c:\temp\host-agent-install-log.txt’ </powershell> ————– Go to AWS EC2 console and select Windows image (e.g. Windows_Server-2012-R2_RTM-English-64Bit-Base-2014.10.15 (ami-ba13abd2)) Click Launch/Spot Request Provide user data as user-data.txt file Now you will get Windows instance with AWS CodeDeployContinue reading “Howto install AWS CodeDeploy on EC2 Windows instance by using CloudInit”

Amazon RDS Now Supports T2 Instances

That is good news. T2 instances CPU credits is really great feature introduced 2 months ago for EC2. Amazon RDS Now Supports T2 Instances At the same time the price for T2 RDS instances is twice less then for the previous generation. T2.micro EC2 + T2.micro RDS are good if you are thinking about web appContinue reading “Amazon RDS Now Supports T2 Instances”

#PowerShell: Register AWS EC2 instances in Amazon Route53 (new way)

Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service. Just in case – Amazon EC2 I use this script https://github.com/konstantinvlasenko/cloud/blob/master/Register-CNAME.ps1 to provide meaningful names for them. Simple usage: $config = @{ DomainName = ‘mylab.com’ } $name = “www.$($config.DomainName)” # get instances $instance = (Get-EC2Instance $InstanceId).RunningInstance # update R53 .\Register-CNAME.ps1Continue reading “#PowerShell: Register AWS EC2 instances in Amazon Route53 (new way)”