< Back

New-PSCFNPackage

Sun Jan 19, 2020 6:25 pm

NAME New-PSCFNPackage



SYNOPSIS

Create a deployment package a-la aws cloudformation package





SYNTAX

New-PSCFNPackage [-TemplateFile] <String> [-S3Bucket] <String> [[-S3Prefix] <String>] [[-KmsKeyId] <String>]

[[-OutputTemplateFile] <String>] [-UseJson] [-ForceUpload] [[-Metadata] <Hashtable>] [<CommonParameters>]





DESCRIPTION

Packages the local artifacts (local paths) that your AWS CloudFormation template references. The command uploads

local artifacts, such as source code for an AWS Lambda function or a Swagger file for an AWS API Gateway REST API,

to an S3 bucket. The command returns a copy of your template, replacing references to local artifacts with the S3

location where the command uploaded the artifacts.

Use this command to quickly upload local artifacts that might be required by your template. After you package your

template's artifacts, run one of the *-PSCFNStack cmdlets to deploy the returned template.





PARAMETERS

-TemplateFile <String>

The path where your AWS CloudFormation template is located.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-S3Bucket <String>

The name of the S3 bucket where this command uploads the artifacts that are referenced in your template.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-S3Prefix <String>

A prefix name that the command adds to the artifacts' name when it uploads them to the S3 bucket. The prefix

name is a path name (folder name) for the S3 bucket.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-KmsKeyId <String>

The ID of an AWS KMS key that the command uses to encrypt artifacts that are at rest in the S3 bucket.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OutputTemplateFile <String>

The path to the file where the command writes the output AWS CloudFormation template. If you don't specify a

path, the command writes the template to the standard output.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UseJson [<SwitchParameter>]

Indicates whether to use JSON as the format for the output AWS CloudFormation template. YAML is used by

default.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ForceUpload [<SwitchParameter>]

Indicates whether to override existing files in the S3 bucket. Specify this flag to upload artifacts even if

they match existing artifacts in the S3 bucket.

CAVEAT: MD5 checksums are used to compare the local and S3 versions of the artifact. If the artifact is a zip

file, then it will almost certainly be

uploaded every time as zip files contain datetimes (esp. last access time) and other file metadata that may

change from subsequent invocations of zip on the local artifacts.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Metadata <Hashtable>

A map of metadata to attach to ALL the artifacts that are referenced in your template.



Required? false

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None





OUTPUTS

[string]

If -OutputTemplateFile is not provided, then the output is the converted template.





NOTES





https://github.com/aws/aws-extensions-f ... ilities.cs





RELATED LINKS