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 | |
# | |
# Sample for getting temp session token from AWS STS | |
# | |
# aws sts get-session-token \ | |
# --serial-number arn:aws:iam::012345678901:mfa/user --token-code 012345 | |
# | |
# Based on : https://gist.github.com/ogavrisevs/2debdcb96d3002a9cbf2 | |
# |
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
public void restoreObject() { | |
// INPUT VARIABLES | |
String BUCKET = "bucket-name"; | |
// Adress to the root folder e.g. String key = "users/newhighglass"; | |
String key = "tmp"; | |
String dayBeforeDeletion = "25-Oct-2015"; // A day before the deletion |