Skip to content

Instantly share code, notes, and snippets.

@guimadaleno
Last active February 25, 2019 23:11
Show Gist options
  • Save guimadaleno/05061236ac51f310086e86c5aab81929 to your computer and use it in GitHub Desktop.
Save guimadaleno/05061236ac51f310086e86c5aab81929 to your computer and use it in GitHub Desktop.
Transferindo dados de um bucket AWS S3 para outro em outra conta
=======================================================================================================
Cole esta política no bucket que contém os dados a serem transferidos
Nota: No exemplo abaixo, 000000000000 é a ID da conta da AWS que receberá os dados a serem transferidos
=======================================================================================================
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DelegateS3Access",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::000000000000:root"
},
"Action": [
"s3:ListBucket",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::BUCKET_ORIGEM/*",
"arn:aws:s3:::BUCKET_ORIGEM"
]
}
]
}
=====================================================================================================
Cole esta política no bucket que irá receber os dados
Nota: No exemplo abaixo, 999999999999 é a ID da conta da AWS que possui os dados a serem transferidos
=====================================================================================================
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::999999999999:root"
},
"Action": [
"s3:ListBucket",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": [
"arn:aws:s3:::BUCKET_DESTINO",
"arn:aws:s3:::BUCKET_DESTINO/*"
]
}
]
}
Testado com sucesso em 25/02/2019
Se alguém tiver um update, gentileza compartilhar. Obrigado!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment