Amazon EFS assets from Github repositories or S3 buckets
Project description
cdk-efs-assets
CDK construct library to populate Amazon EFS assets from Github or S3.
Sample
The sample below creates the sync from github repository to Amazon EFS filesystem.
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk_efs_assets import GithubSourceSync
app = App()
env = {
"region": process.env.CDK_DEFAULT_REGION ?? AWS_DEFAULT_REGION,
"account": process.env.CDK_DEFAULT_ACCOUNT
}
stack = Stack(app, "testing-stack", env=env)
vpc = ec2.Vpc.from_lookup(stack, "Vpc", is_default=True)
fs = efs.FileSystem(stack, "Filesystem",
vpc=vpc,
removal_policy=RemovalPolicy.DESTROY
)
efs_access_point = fs.add_access_point("EfsAccessPoint",
path="/demo",
create_acl={
"owner_gid": "1001",
"owner_uid": "1001",
"permissions": "0755"
},
posix_user={
"uid": "1001",
"gid": "1001"
}
)
# create the one-time sync from Github repository to Amaozn EFS
GithubSourceSync(stack, "GithubSourceFeeder",
repository="https://github.com/pahud/cdk-spot-one.git",
efs_access_point=efs_access_point,
efs_security_group=fs.connections.security_groups,
vpc=vpc
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cdk-efs-assets-0.0.2.tar.gz
(20.6 kB
view hashes)
Built Distribution
Close
Hashes for cdk_efs_assets-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 102aa706040877f60cfbabb8818e421d8b548a6e4e27fbdc8167442a77ae7195 |
|
MD5 | 6b934e54e552d115c2283c277b4eec2c |
|
BLAKE2b-256 | dc3269a8850b28c3bdc17ea6a1b5d4449789a1e1e4ddd5ae2b8d1045b6b65b57 |