uAmazon S3vɃAbv[hCSVt@CuAmazon DynamoDBvɎo^uAWS Lambdav֐̍FAWS`[gV[g - IT

uAmazon S3vɃAbv[hCSVt@CuAmazon DynamoDBvɎo^uAWS Lambdav֐̍FAWS`[gV[g

AWSpɂ֗ȏZȌɏЉAځuAWS`[gV[gvB́AuAWS LambdavgāuAmazon S3vɃAbv[hCSVuAmazon DynamoDBvɎo^@ЉB

» 2021N0924 0500 J
[V쐷CITXN[]

̋L͉łBo^ijƑSĂ܂B

@uAmazon Web ServicesviAWSjpɂ֗ȏZȌɏЉAځuAWS`[gV[gvB́AuAWS LambdavgāuAmazon S3vɃAbv[hCSVt@CuAmazon DynamoDBvɎo^@Љ܂B

@DynamoDB́AeiXǗA^pAXP[OAWSst}l[WhNoSQLf[^x[XT[rXłBȃ[XP[XƂāAWebX}zAṽ[U[AZbV̊ǗALQ[̃[U[sǗȂǂ܂B

@DynamoDB𗘗pĂƂтяo킷̂uCSV`̃f[^ꊇDynamoDBe[uɎ荞݂vƂV[łB̎@ƂāALambdaS3𗘗p܂B

DynamoDBւCSVt@Co^菇ƍ\

@sDynamoDBւCSVo^͐}1̂悤ȍ\łB

}1@DynamoDBCSVt@CC|[g\

@L̎菇ɉčƂ܂B

  1. DynamoDBe[u̍쐬
  2. S3oPbg쐬CSVt@CAbv[h
  3. Lambda֐puAWS Identity and Access ManagementviIAMj[̍쐬
  4. DynamoDBɃf[^o^Lambda֐̍쐬
  5. 쐬Lambda֐̃eXg
  6. S3oPbgŃCxggK[ݒ

yXebv1zDynamoDBe[u̍쐬

@DynamoDBR\[ue[u̍쐬vNbNăe[u쐬ʁi}2jɑJڂA̒ʂɒlݒ肵܂B

  • e[uFemployee_table
  • p[eBVL[Fid

}2@DynamoDB̃e[u쐬

@\[gL[̎w͔CӂȂ̂ō͏ȗȂ̐ݒftHĝ܂܂Łue[u̍쐬vNbN܂B

@\b`Ńe[u̍쐬Xe[^XuActivevɂȂĂ邱ƂmFł܂B

}3@쐬DynamoDBe[u

yXebv2zS3oPbg쐬CSVt@CAbv[h

@xS3_bV{[hɑJڂACӂ̖O͂AuoPbg̍쐬v{^S3oPbg쐬܂B

@oPbg̍쐬DynamoDBɃC|[gCSVt@CAbv[h܂B

@쐬oPbgNbNAuAbv[hv{^Ńt@CAbv[h܂B

}4@S3oPbgɃAbv[hꂽCSVt@C

@{eŃAbv[huemployee.csvv͎̂悤ȓełB

1,{,j,cƕ
2,i,j,l
3,kc,,VXe
4,ԏ,,VXe
5,u,j,
6,,,VXe

yXebv3zLambda֐pIAM[̍쐬

@Lambda֐̎sɕKvƂȂIAM[쐬܂B

@IAM_bV{[hu[vu[̍쐬vƃNbNđJڂʂŁÂ悤ɑIāũXebvFANZXvɐi݂܂B

  • GeBeB̎ށFAWST[rX
  • ʓIȃ[XP[XFLambda

}5@IAM[̃GeBeBƃ[XP[XI

@IAM[ɃA^b`IAM|V[́AȉAWSǗ|V[ƃ[U[Ǘ|V[w肵܂B

  • AWSǗ|V[
    • AWSLambdaBasicExecutionRole
    • AWSLambdaInvocation-DynamoDB
    • AmazonS3ReadOnlyAccess

@[U[Ǘ|V[͎ō쐬Kv܂B

  • [U[Ǘ|V[
    • OFdynamodb-put-batchwrite
    • ANZXFȉ̃|V[t^
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Resource": "*",
            "Action": [
                "dynamodb:PutItem",
                "dynamodb:BatchWriteItem"
            ]
        }
    ]
}

@ŌɃ[w肵āu[̍쐬vNbN΁AXebv3͊łB

  • [Flambda-import-csv-into-dynamodb

}6@[w肵IAM[쐬

yXebv4zDynamoDBɃf[^o^Lambda֐̍쐬

Copyright © ITmedia, Inc. All Rights Reserved.

X|T[̂m点PR

ڂ̃e[}

Microsoft  WindowsőO2025
AI for GWjAO
[R[h^m[R[h Zg by IT - ITGWjArWlX̒SŊ􂷂gD
Cloud Native Central by IT - XP[uȔ\͂gD
VXeJmEnE yirzPR
Ȃɂ߂̋LPR

RSSɂ‚

ACeBfBAIDɂ‚

[}KWo^

IT̃[}KẂA AׂĖłBЃ[}KWwǂB